@tailwind base;
@tailwind components;
@tailwind utilities;

.sticky-col {
  position: sticky;
  background: white;
}
.left-0 { left: 0; }
.right-0 { right: 0; }
.z-10 { z-index: 10; }
.overflow-x-auto {
  overflow-x: scroll !important;
  scrollbar-width: auto;
  scrollbar-color: #cbd5e1 #f1f5f9;
}
.overflow-x-auto::-webkit-scrollbar {
  height: 10px;
  background: #f1f5f9;
}
.overflow-x-auto::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* This ensures the first and second columns ("No" and "Name") are both sticky. */
.sticky-col {
  position: sticky;
  background: white;
}
.left-0 { left: 0; }
.left-1 { left: 60px; } /* adjust if your first col is wider or narrower than 60px */
.right-0 { right: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }

.sticky-col    { position: sticky; background: white; }
.no-col        { width: 56px; min-width: 56px; max-width: 56px; left: 0; z-index: 30; }
.name-col      { width: 180px; min-width: 180px; max-width: 180px; left: 56px; z-index: 20; }
.actions-col   { right: 0; z-index: 10; }

.profile-summary-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 24px;
}

.profile-summary-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.profile-summary-item dt {
  font-weight: 600;
  color: #475569;
}

.profile-summary-item dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
  color: #111827;
}

.profile-section-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  align-items: stretch;
}

.profile-section-grid .md-card {
  height: 100%;
}

.profile-section-form {
  gap: 20px;
}

.profile-section-form .md-field {
  margin-bottom: 0;
}

.profile-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.profile-feedback {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: #0f7b32;
}

.profile-feedback.error {
  color: #b3261e;
}

.profile-feedback.hidden {
  display: none;
}

.profile-balance-chips .balance-chip {
  flex: 1;
  min-width: 0;
}

.profile-payslip-status {
  margin: 4px 0 12px;
  color: #475569;
  font-weight: 500;
}

.profile-payslip-actions {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  align-items: center;
}

.settings-help-list {
  margin: 16px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 0.95rem;
}

.settings-help-list code {
  background: rgba(37, 99, 235, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.form-actions .md-button--text {
  margin-left: auto;
}

.position-item {
  padding: 0;
  gap: 0;
  cursor: default;
}

.position-item__select {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.position-item__select:focus {
  outline: none;
}

.position-item__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 12px;
}

.position-item__actions .md-button {
  white-space: nowrap;
}

.candidate-actions-header {
  width: 140px;
}

.candidate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.candidate-actions .md-button {
  padding-inline: 8px;
}

.candidate-search-results {
  margin-top: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 56px;
  background: #f8fafc;
}

.candidate-search-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.candidate-search-item__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.candidate-search-item__name {
  font-weight: 600;
  color: #0f172a;
  font-size: 1rem;
  word-break: break-word;
}

.candidate-search-item__details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.candidate-search-item__detail {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 64px;
}

.candidate-search-item__detail-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.candidate-search-item__detail-value {
  font-size: 0.9rem;
  color: #0f172a;
  word-break: break-word;
}

.candidate-search-item__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  min-width: 160px;
}

.candidate-search-item__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-primary, #6750a4);
  text-transform: uppercase;
  white-space: nowrap;
}

.candidate-search-item__status.candidate-search-item__status--muted {
  background: #e2e8f0;
  color: #475569;
}

.candidate-search-item__view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}

.candidate-search-item__view-btn .material-symbols-rounded {
  font-size: 18px;
}

.candidate-search-item__no-cv {
  font-size: 0.85rem;
  color: #94a3b8;
}

.candidate-search-empty {
  font-style: italic;
}

.candidate-search-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.candidate-search-loading .material-symbols-rounded {
  animation: spin 1s linear infinite;
}

.candidate-cv-modal {
  width: clamp(320px, 80vw, 1280px);
  max-width: 80vw;
  height: 80vh;
  max-height: 80vh;
}

.candidate-cv-modal__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.candidate-cv-modal__message {
  margin: 0;
  font-size: 0.95rem;
}

.candidate-cv-modal__iframe {
  width: 100%;
  flex: 1;
  min-height: 0;
  border: none;
  border-radius: 12px;
  background: #f8fafc;
}

.candidate-cv-modal .modal-actions {
  justify-content: flex-end;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.finance-controls-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finance-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
}

.finance-month-field {
  flex: 1;
  min-width: 220px;
}

.finance-controls .md-button {
  align-self: flex-end;
}


.finance-card-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finance-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.finance-card-grid.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.finance-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.finance-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.finance-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.finance-actions .md-button {
  min-width: 140px;
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.finance-table th,
.finance-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.finance-table tbody tr:hover {
  background: #f8fafc;
}

.finance-table tbody.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.finance-employee-name {
  font-weight: 600;
  display: block;
}

.finance-employee-meta {
  color: #64748b;
  font-size: 0.85rem;
  margin-top: 2px;
  display: block;
}

.finance-card-status {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.finance-salary-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.finance-salary-input {
  width: 100%;
}

.finance-salary-input .material-symbols-rounded {
  color: #475569;
}

.finance-card__body .md-label {
  margin-bottom: 4px;
  display: inline-block;
}

.finance-card .md-input-wrapper {
  width: 100%;
}

.finance-card .md-input {
  width: 100%;
  min-width: 0;
}

.finance-salary-updated {
  font-size: 0.75rem;
  color: #64748b;
}

.finance-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  color: #64748b;
}

.finance-empty .material-symbols-rounded {
  font-size: 36px;
  color: #4caf50;
}

.employee-search {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 420px;
}

.employee-search__field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d0d7e2;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.employee-search__field input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #0f172a;
}

.employee-search__field .material-symbols-rounded {
  color: #607d8b;
  font-size: 20px;
}

.employee-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e9f2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

.employee-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
  gap: 12px;
}

.employee-info {
  display: flex;
  flex-direction: column;
}

.employee-name {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
}

.employee-role {
  font-size: 13px;
  color: #6b7280;
}

.employee-save-button {
  width: 42px;
  height: 42px;
  padding: 6px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.employee-save-button .material-symbols-rounded {
  font-size: 22px;
}

.employee-save-button:disabled {
  opacity: 0.75;
  cursor: default;
  box-shadow: none;
}

.employee-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: space-between;
}

.salary-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.salary-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.salary-input-wrapper {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 8px 12px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.salary-icon {
  font-size: 18px;
  color: #4b5563;
}

.salary-input-wrapper input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  background: transparent;
  color: #111827;
}

.salary-input-wrapper input:focus {
  border: none;
  outline: none;
}

.salary-adornment {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
  padding: 4px 8px;
  border-radius: 8px;
}

.employee-updated {
  font-size: 11px;
  color: #9ca3af;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.finance-empty.hidden {
  display: none;
}

/* Active employees cards */
.active-employees-section {
  margin-top: 24px;
}

.active-employees-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}

.active-employees-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.active-employees-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: #6b7280;
}

.employee-search-wrapper {
  min-width: 220px;
}

.employee-search-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.employee-search-input-wrapper {
  position: relative;
}

.employee-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #9ca3af;
  pointer-events: none;
}

.employee-search-input {
  width: 100%;
  padding: 7px 10px 7px 28px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  color: #111827;
}

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

.employee-search-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px #4f46e5;
}

.employee-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .employee-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .employee-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.employee-card {
  background-color: #ffffff;
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.employee-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.employee-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.employee-role {
  margin: 2px 0 0;
  font-size: 12px;
  color: #6b7280;
}

.employee-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background-color: #10b981;
  margin-top: 2px;
}

.employee-card-middle {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.employee-salary-group {
  flex: 1;
}

.employee-salary-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.employee-salary-input-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background-color: #f9fafb;
}

.employee-salary-icon {
  font-size: 15px;
  color: #f59e0b;
}

.employee-salary-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  background-color: transparent;
  color: #111827;
}

.employee-salary-input::-webkit-outer-spin-button,
.employee-salary-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.employee-salary-input[type="number"] {
  -moz-appearance: textfield;
}

.employee-salary-currency {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
}

.employee-save-button {
  padding: 7px 14px;
  border-radius: 9999px;
  border: none;
  background-color: #4f46e5;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

.employee-save-button:hover {
  background-color: #4338ca;
}

.employee-save-button:active {
  background-color: #3730a3;
}

.employee-save-button:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

.employee-updated {
  margin: 0;
  font-size: 11px;
  color: #9ca3af;
}

.finance-subtabs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 12px;
}

.finance-subtab {
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  color: #374151;
  padding: 8px 14px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.finance-subtab:hover {
  background-color: #eef2ff;
  border-color: #c7d2fe;
}

.finance-subtab.active {
  background-color: #4338ca;
  color: #ffffff;
  border-color: #4338ca;
  box-shadow: 0 8px 24px rgba(67, 56, 202, 0.2);
}

.finance-subtab:focus-visible {
  outline: 2px solid #4338ca;
  outline-offset: 2px;
}

.finance-subtab-panel--active {
  display: block;
}

.recruitment-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}

.recruitment-subtab {
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  color: #1f2937;
  padding: 9px 14px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.recruitment-subtab:hover {
  background-color: #ecfeff;
  border-color: #a5f3fc;
}

.recruitment-subtab.active {
  background-color: #0891b2;
  color: #ffffff;
  border-color: #0891b2;
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.25);
}

.recruitment-subtab:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 2px;
}

.recruitment-tab-panel {
  display: none;
}

.recruitment-subtab-panel--active {
  display: block;
}

.recruitment-pipeline-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
}

.recruitment-pipeline-grid .md-card {
  flex: 1 1 320px;
  min-width: 0;
}

.recruitment-pipeline-grid .md-card:first-child {
  flex: 0 1 420px;
}

.recruitment-table-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.recruitment-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.payroll-summary-section {
  margin-top: 32px;
  padding: 20px;
  border-radius: 16px;
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.payroll-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.payroll-summary-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.payroll-summary-subtitle {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.payroll-summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.payroll-summary-month {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9999px;
  background-color: #eef2ff;
  color: #4338ca;
  font-weight: 600;
}

.payroll-export-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(67, 56, 202, 0.15);
}

.payroll-export-button .material-symbols-rounded {
  font-size: 18px;
}

/* Payroll Summary table container */
.payroll-table-wrapper {
  margin-top: 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  overflow: hidden;
  /* expanded height to show most of the viewport while keeping scroll when overflowing */
  min-height: 120vh;
  max-height: 170vh;
  overflow-y: auto;
}

/* scrollbars can be tweaked if desired */
.payroll-table-wrapper::-webkit-scrollbar {
  width: 8px;
}
.payroll-table-wrapper::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 999px;
}

/* Base table styling */
.payroll-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #111827;
}

/* Header row */
.payroll-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #f3f4f6;
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

/* Body rows */
.payroll-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
}

/* Zebra striping */
.payroll-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}
.payroll-table tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

/* Hover effect */
.payroll-table tbody tr:hover {
  background-color: #eef2ff;
}

/* Alignment for salary column */
.payroll-table tbody td:nth-child(2) {
  text-align: right;
}

/* Optional: truncate long bank names / numbers with ellipsis */
.payroll-table tbody td:nth-child(3),
.payroll-table tbody td:nth-child(4) {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payroll-summary-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.payroll-summary-empty {
  padding: 16px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  background-color: #ffffff;
  border-top: 1px solid #e5e7eb;
}

.ai-questions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.ai-question-row {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.ai-question-row__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ai-question-row__label {
  font-weight: 600;
  color: #111827;
  font-size: 14px;
}

.ai-questions-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}


/* === Modern Employee Management Layout === */
.kpi-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 32px;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 70%);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
}

.kpi-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
}

.kpi-card__icon--success { background: rgba(16, 200, 84, 0.12); color: #0f7b32; }
.kpi-card__icon--warning { background: rgba(245, 158, 11, 0.12); color: #c27803; }
.kpi-card__icon--info { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }

.kpi-card__label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.kpi-card__value {
  margin: 2px 0 0;
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-radius: 14px;
  margin-bottom: 24px;
}

.action-bar__primary,
.action-bar__secondary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: #94a3b8;
}

.search-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  min-width: 260px;
}

.search-input input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  outline: none;
  color: #0f172a;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}

.view-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-weight: 600;
  color: #4f46e5;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-toggle__btn--active {
  background: #4f46e5;
  color: white;
  box-shadow: 0 12px 22px rgba(79, 70, 229, 0.26);
}

.filter-select,
.data-grid__select {
  min-width: 160px;
  border-radius: 10px;
  padding: 8px 10px;
}

.data-grid-card {
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 55%, #ffffff 100%);
}

.data-grid__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.data-grid__eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #94a3b8;
}

.data-grid__title {
  margin: 4px 0 0;
  font-size: 20px;
  color: #0f172a;
}

.column-visibility {
  position: relative;
}

.column-visibility__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
}

.column-visibility__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.15);
  padding: 12px;
  display: none;
  z-index: 30;
}

.column-visibility__menu.is-open { display: block; }

.column-visibility__menu label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
}

.column-visibility__menu label:hover { background: #f8fafc; }

.data-grid__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.chip-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #312e81;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid #e0e7ff;
}

.data-grid__surface { margin-top: 18px; }

.data-grid__scroll {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.data-grid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 900px;
  font-size: 14px;
}

.data-grid-table thead th {
  position: relative;
  background: #f8fafc;
  color: #0f172a;
  text-align: left;
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  user-select: none;
}

.data-grid-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  background: #ffffff;
}

.data-grid-table tbody tr:hover td { background: #f8fafc; }

.data-grid-table .sticky-name,
.data-grid-table .sticky-status,
.data-grid-table .sticky-actions {
  position: sticky;
  z-index: 5;
  background: inherit;
}

.data-grid-table .sticky-name { left: 0; z-index: 7; }
.data-grid-table .sticky-status { left: var(--name-col-width, 240px); z-index: 6; }
.data-grid-table .sticky-actions { right: 0; z-index: 6; }

.data-grid-table th,
.data-grid-table td {
  min-width: 140px;
}

.data-grid-table .cell-ellipsis {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-grid-table .resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.data-grid-table .resize-handle span {
  width: 2px;
  height: 16px;
  background: #cbd5e1;
  border-radius: 999px;
}

.data-grid-table .sort-indicator {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #94a3b8;
  margin-left: 6px;
}

.sort-button {
  background: transparent;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.sort-button:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
  border-radius: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.badge--success { background: rgba(16, 200, 84, 0.12); color: #0f7b32; }
.badge--warning { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.badge--info { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.badge--neutral { background: #e2e8f0; color: #0f172a; }

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions button {
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
  background: #eef2ff;
  color: #312e81;
}

.table-actions button.action-danger {
  background: rgba(248, 113, 113, 0.14);
  color: #b91c1c;
}

.intern-toggle {
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 999px;
  background: #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.intern-toggle::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  top: 2px;
  left: 2px;
  transition: all 0.15s ease;
}

.intern-toggle.is-on { background: #4f46e5; }
.intern-toggle.is-on::after { transform: translateX(18px); }

.data-grid__pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px 4px;
  color: #475569;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-buttons button {
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: #0f172a;
}

.pagination-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.detail-row td {
  background: #f8fafc;
}
.detail-row { cursor: default; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px 16px;
}

.detail-grid__item {
  padding: 10px 12px;
  border-radius: 12px;
  background: white;
  border: 1px dashed #e2e8f0;
}

.detail-grid__label {
  font-size: 12px;
  color: #94a3b8;
  margin: 0 0 4px;
}

.detail-grid__value {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}

.employee-card-wrapper { margin-top: 24px; }

.employee-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.employee-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.employee-card__header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.employee-card__name { margin: 0; font-size: 16px; font-weight: 700; color: #0f172a; }
.employee-card__title { margin: 4px 0 0; color: #475569; font-weight: 600; font-size: 13px; }

.employee-card__meta { display: grid; gap: 8px; }
.employee-card__meta p { margin: 0; color: #0f172a; font-weight: 600; }
.employee-card__meta small { color: #94a3b8; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hover-rise { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.hover-rise:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16); }

.data-grid-table tbody tr { cursor: pointer; }
.data-grid-table tbody tr.actions-row { cursor: default; }

.data-grid__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f172a;
  border: 1px solid #bae6fd;
  font-weight: 700;
}

.data-grid__pill .material-symbols-rounded { font-size: 18px; }

@media (max-width: 1024px) {
  .data-grid__header { align-items: flex-start; }
  .action-bar { flex-direction: column; align-items: flex-start; }
  .action-bar__secondary { width: 100%; justify-content: flex-start; }
  .search-input { width: 100%; min-width: 0; }
  .filter-controls { width: 100%; }
}

@media (max-width: 720px) {
  .data-grid-table { min-width: 100%; }
  .data-grid-card { padding: 18px; }
  .kpi-card { padding: 16px; }
  .view-toggle { width: 100%; justify-content: space-between; }
  .view-toggle__btn { flex: 1; justify-content: center; }
  .filter-select { width: 100%; }
  .action-bar__secondary { flex-direction: column; align-items: stretch; }
}
