/* Custom UI – design tokens only. Raw palette from style.css, semantic tokens from design-tokens.css. */

.card-header {
  backdrop-filter: saturate(180%) blur(6px);
}

.table.bordered-table tbody tr:hover {
  background: var(--table-row-hover, rgba(0, 0, 0, 0.025));
  transition: background 0.15s ease-in-out;
}

.badge.radius-4,
.badge {
  line-height: 1.1;
  border-radius: var(--radius-sm);
}

.text-xxs {
  font-size: var(--text-xxs);
}

.card > .table-footer-bar {
  background: var(--card-header-bg, var(--color-neutral-50));
  border-top: 1px solid var(--color-neutral-200);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-xs);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card.bg-gradient-start-1,
.card.bg-gradient-start-2,
.card.bg-gradient-start-3,
.card.bg-gradient-start-4,
.card.bg-gradient-start-5 {
  position: relative;
  overflow: hidden;
}

.card.bg-gradient-start-1::before,
.card.bg-gradient-start-2::before,
.card.bg-gradient-start-3::before,
.card.bg-gradient-start-4::before,
.card.bg-gradient-start-5::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.25;
  background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.9), transparent 70%);
}

.card-header h6 {
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.25px;
}

[data-collapse] {
  transition: height 0.25s ease;
  overflow: hidden;
}

.personel-birthday-badge {
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.personel-birthday-badge .personel-birthday-icon {
  color: currentColor;
  transition: transform 0.18s ease;
}

.table.bordered-table tbody tr:hover .personel-birthday-badge,
.personel-birthday-badge:hover {
  background-color: var(--color-warning-50, #fffbeb);
  border-color: var(--color-warning-300, #fcd34d);
  color: var(--color-warning-700, #b45309);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.16);
  transform: translateY(-1px);
}

.table.bordered-table tbody tr:hover .personel-birthday-badge .personel-birthday-icon,
.personel-birthday-badge:hover .personel-birthday-icon {
  transform: scale(1.08);
}

.list-filter-card {
  position: relative;
}

.list-filter-card .searchable-select-wrapper,
.list-filter-card .searchable-select {
  width: 100%;
}

.list-filter-card .searchable-select__trigger,
.list-filter-card .form-control,
.list-filter-card .form-select {
  min-height: 44px;
}

.demo-filter-card .form-label {
  margin-bottom: 6px;
}

.demo-filter-card .form-control,
.demo-filter-card .form-select,
.demo-filter-card .searchable-select__trigger {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.94) 100%);
}

.demo-filter-card .col-xl-4 .form-control {
  box-shadow: 0 0 0 1px rgba(51, 92, 255, 0.08);
}

.demo-date-range {
  min-width: 0;
}

.demo-date-range .form-control {
  flex: 1 1 0;
  min-width: 0;
}

.demo-filter-card .card-body {
  padding-top: 18px;
  padding-bottom: 18px;
}

.demo-quick-filters {
  padding-top: 8px;
  border-top: 1px dashed var(--color-neutral-200, #e5e7eb);
}

.demo-quick-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-neutral-300, #d0d5dd);
  color: var(--color-secondary-600, #475467);
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: 600;
  background: #fff;
}

.demo-quick-filter-chip.is-active,
.demo-quick-filter-chip:hover {
  color: var(--color-primary-700, #2949cc);
  border-color: rgba(51, 92, 255, 0.24);
  background: rgba(51, 92, 255, 0.08);
}

.demo-active-filters {
  padding-top: 8px;
}

.demo-active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--color-secondary-700, #344054);
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: 600;
}

.demo-active-filter-chip:hover {
  background: rgba(51, 92, 255, 0.10);
  color: var(--color-primary-700, #2949cc);
}

.demo-bulk-bar {
  position: sticky;
  top: 84px;
  z-index: 8;
}

.demo-saved-views {
  position: relative;
}

.demo-saved-views__toggle.is-open {
  background: rgba(51, 92, 255, 0.08);
  border-color: rgba(51, 92, 255, 0.28);
  color: var(--color-primary-700, #2949cc);
}

.demo-saved-views__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(51, 92, 255, 0.12);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
}

.demo-saved-views__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-width: min(92vw, 340px);
  padding: 16px;
  border: 1px solid var(--color-neutral-200, #e5e7eb);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
  z-index: 1050;
}

.demo-saved-views__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--color-neutral-200, #e5e7eb);
}

.demo-saved-views__section + .demo-saved-views__section {
  margin-top: 16px;
}

.demo-saved-views__close {
  appearance: none;
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary-500, #667085);
}

.demo-saved-views__close:hover {
  background: var(--color-neutral-100, #f2f4f7);
  color: var(--color-secondary-700, #344054);
}

.demo-saved-views__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-saved-views__list--preset {
  gap: 6px;
}

.demo-saved-view-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-saved-view-item {
  appearance: none;
  border: 1px solid var(--color-neutral-200, #e5e7eb);
  background: #fff;
  color: var(--color-secondary-700, #344054);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: left;
  flex: 1 1 auto;
}

.demo-saved-view-item:hover {
  border-color: rgba(51, 92, 255, 0.24);
  background: rgba(51, 92, 255, 0.05);
  color: var(--color-primary-700, #2949cc);
}

.demo-saved-view-delete {
  appearance: none;
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary-500, #667085);
  flex: 0 0 auto;
}

.demo-saved-view-delete:hover {
  background: rgba(220, 38, 38, 0.08);
  color: #b42318;
}

.demo-column-menu {
  min-width: 180px;
}

.demo-column-customizer {
  position: relative;
}

.demo-column-customizer__toggle.is-open {
  background: rgba(51, 92, 255, 0.08);
  border-color: rgba(51, 92, 255, 0.28);
  color: var(--color-primary-700, #2949cc);
}

.demo-column-customizer__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(51, 92, 255, 0.12);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
}

.demo-column-customizer__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-width: min(92vw, 320px);
  padding: 16px;
  border: 1px solid var(--color-neutral-200, #e5e7eb);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
  z-index: 1050;
}

.demo-column-customizer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--color-neutral-200, #e5e7eb);
}

.demo-column-customizer__close {
  appearance: none;
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary-500, #667085);
}

.demo-column-customizer__close:hover {
  background: var(--color-neutral-100, #f2f4f7);
  color: var(--color-secondary-700, #344054);
}

.demo-column-customizer__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--color-neutral-200, #e5e7eb);
}

.demo-column-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--color-secondary-700, #344054);
  padding: 6px 0;
}

.demo-column-option input {
  margin: 0;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: #4f7cff;
  border: 1px solid var(--color-neutral-400, #98a2b3);
  border-radius: 4px;
  background: #fff;
  opacity: 1;
  display: inline-block;
  visibility: visible;
}

.demo-column-hidden {
  display: none !important;
}

.table-list-card {
  border-color: var(--color-neutral-200, #e5e7eb);
  overflow: visible !important;
}

.table-list-card > .card-header {
  overflow: visible;
  position: relative;
  z-index: 100;
}

.table-list-card > .card-body {
  position: relative;
  z-index: 1;
}

.table-list-card .table-responsive {
  overflow-x: auto;
  position: relative;
  z-index: 1;
}

.table-list-card .table.bordered-table tbody tr {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.table-list-card .table.bordered-table tbody tr:hover {
  background: rgba(72, 127, 255, 0.035);
}

.table-list-card .table.bordered-table tbody tr:hover td {
  background: transparent;
}

.table-list-card .table.bordered-table tbody td,
.table-list-card .table.bordered-table thead th {
  vertical-align: middle;
}

.table-list-card .table-list-footer-main {
  flex: 1 1 auto;
  min-width: 0;
}

.table-list-card .table-list-footer-side {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.table-list-card .table-list-footer {
  flex-wrap: nowrap;
}

.table-sort-link {
  color: var(--color-secondary-600, #475467);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.18s ease, transform 0.18s ease;
}

.table-sort-link:hover {
  color: var(--color-primary-600, #335cff);
}

.table-sort-link.is-active {
  color: var(--color-primary-700, #2949cc);
}

.table-sort-button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--color-secondary-600, #475467);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.18s ease;
}

.table-sort-button:hover,
.table-sort-button.is-active {
  color: var(--color-primary-700, #2949cc);
}

.demo-table-footer {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.demo-table-footer__meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.demo-pagination {
  display: flex;
  justify-content: flex-end;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.demo-pagination-track {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-width: max-content;
}

.demo-pagination-pages {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: 6px;
}

.demo-pagination-btn {
  min-width: 36px;
  flex: 0 0 auto;
}

.demo-pagination .btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.demo-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #335cff 0%, #0ea5e9 100%);
}

.list-action-btn {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.list-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

@media (max-width: 991.98px) {
  .table-list-card .table-list-footer {
    flex-wrap: wrap;
  }

  .table-list-card .table-list-footer-side {
    width: auto;
    max-width: 100%;
    margin-left: auto;
  }

  .demo-table-footer {
    grid-template-columns: 1fr;
  }

  .demo-pagination {
    justify-content: flex-end;
  }

  .demo-column-customizer__panel {
    width: min(92vw, 320px);
  }

  .demo-bulk-bar {
    top: 72px;
  }
}

/* === KPI Cards Clickable === */
.demo-kpi-link {
  display: block;
  border-radius: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.demo-kpi-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.demo-kpi-link.is-active {
  box-shadow: 0 0 0 2px rgba(51, 92, 255, 0.5), 0 4px 16px rgba(51, 92, 255, 0.12);
  border-radius: 12px;
}

.demo-kpi-link .card {
  margin-bottom: 0;
}

/* === Keyboard Navigation Focus Row === */
.keyboard-focused-row {
  outline: 2px solid var(--color-primary, #335cff);
  outline-offset: -2px;
  background-color: rgba(51, 92, 255, 0.04) !important;
}

.keyboard-focused-row td {
  background-color: inherit !important;
}

/* === Sticky Columns === */
.demo-sticky-table {
  overflow-x: auto;
}

.demo-sticky-table table thead th:nth-child(1),
.demo-sticky-table table tbody td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}

.demo-sticky-table table thead th:nth-child(2),
.demo-sticky-table table tbody td:nth-child(2) {
  position: sticky;
  left: 52px;
  z-index: 2;
  background: #fff;
}

.demo-sticky-table table thead th:nth-child(1),
.demo-sticky-table table thead th:nth-child(2) {
  z-index: 3;
  background: var(--color-neutral-50, #f9fafb);
}

.demo-sticky-table table tbody tr:hover td:nth-child(1),
.demo-sticky-table table tbody tr:hover td:nth-child(2) {
  background: rgba(72, 127, 255, 0.035);
}

/* === Row Detail Expand === */
.demo-expand-btn {
  transition: transform 0.22s ease, background-color 0.18s ease;
}

.demo-expand-btn.is-expanded {
  background-color: rgba(51, 92, 255, 0.12) !important;
}

.demo-expand-icon {
  transition: transform 0.22s ease;
}

.demo-detail-row {
  background: var(--color-neutral-50, #f9fafb) !important;
}

.demo-detail-content {
  padding: 16px 24px 16px 72px;
  border-left: 3px solid rgba(51, 92, 255, 0.3);
  animation: demoDetailSlide 0.22s ease-out;
}

.demo-detail-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.demo-detail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-secondary-500, #667085);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-detail-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-secondary-800, #1d2939);
}

@keyframes demoDetailSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Print / Export === */
@media print {
  .demo-filter-card,
  .demo-bulk-bar,
  .demo-pagination,
  .demo-column-customizer,
  .demo-saved-views,
  .demo-quick-filters,
  .demo-active-filters,
  .sidebar-menu-area,
  .navbar,
  .demo-expand-btn,
  .demo-note-btn,
  .demo-note-popover,
  .list-action-btn,
  .dropdown,
  .demo-group-header__count {
    display: none !important;
  }

  .demo-sticky-table table thead th:nth-child(1),
  .demo-sticky-table table tbody td:nth-child(1),
  .demo-sticky-table table thead th:nth-child(2),
  .demo-sticky-table table tbody td:nth-child(2) {
    position: static;
    box-shadow: none;
  }
}

/* === Row Grouping === */
.demo-group-header {
  background: var(--color-neutral-50, #f9fafb) !important;
}

.demo-group-header__cell {
  padding: 10px 16px !important;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-secondary-700, #344054);
  border-bottom: 2px solid var(--color-primary-200, #c7d7fe) !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-group-header__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(51, 92, 255, 0.1);
  color: var(--color-primary-700, #2949cc);
  font-size: 11px;
  font-weight: 700;
}

/* === Inline Edit === */
.demo-editable-cell {
  cursor: default;
  position: relative;
}

.demo-editable-cell:hover .demo-editable-value {
  border-bottom: 1px dashed rgba(51, 92, 255, 0.3);
}

.demo-inline-input {
  width: 100%;
  border: 1px solid rgba(51, 92, 255, 0.4);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(51, 92, 255, 0.08);
}

.demo-inline-input:focus {
  border-color: rgba(51, 92, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(51, 92, 255, 0.15);
}

.demo-cell-saved {
  animation: demoCellFlash 1.2s ease;
}

@keyframes demoCellFlash {
  0%, 100% { background: transparent; }
  20% { background: rgba(16, 185, 129, 0.12); }
}

/* === Notes Popover === */
.demo-note-popover {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 280px;
  max-width: min(90vw, 280px);
  padding: 12px;
  border: 1px solid var(--color-neutral-200, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  z-index: 1050;
  animation: demoDetailSlide 0.18s ease-out;
}

.demo-note-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.demo-note-popover__close {
  appearance: none;
  border: 0;
  background: transparent;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary-500, #667085);
}

.demo-note-popover__close:hover {
  background: var(--color-neutral-100, #f2f4f7);
}

.demo-note-popover__input {
  width: 100%;
  border: 1px solid var(--color-neutral-200, #e5e7eb);
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
  outline: none;
}

.demo-note-popover__input:focus {
  border-color: rgba(51, 92, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(51, 92, 255, 0.08);
}

.demo-note-popover__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

/* === Keyboard Navigation === */
.demo-row-focused {
  outline: 2px solid rgba(51, 92, 255, 0.5);
  outline-offset: -2px;
  background: rgba(51, 92, 255, 0.04) !important;
}

tr[data-row-id] {
  transition: outline 0.12s ease, background-color 0.12s ease;
}

/* Custom UI – design tokens only. Raw palette from style.css, semantic tokens from design-tokens.css. */

.card-header {
  backdrop-filter: saturate(180%) blur(6px);
}

.table.bordered-table tbody tr:hover {
  background: var(--table-row-hover, rgba(0, 0, 0, 0.025));
  transition: background 0.15s ease-in-out;
}

.badge.radius-4,
.badge {
  line-height: 1.1;
  border-radius: var(--radius-sm);
}

.text-xxs {
  font-size: var(--text-xxs);
}

.card > .table-footer-bar {
  background: var(--card-header-bg, var(--color-neutral-50));
  border-top: 1px solid var(--color-neutral-200);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-xs);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card.bg-gradient-start-1,
.card.bg-gradient-start-2,
.card.bg-gradient-start-3,
.card.bg-gradient-start-4,
.card.bg-gradient-start-5 {
  position: relative;
  overflow: hidden;
}

.card.bg-gradient-start-1::before,
.card.bg-gradient-start-2::before,
.card.bg-gradient-start-3::before,
.card.bg-gradient-start-4::before,
.card.bg-gradient-start-5::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.25;
  background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.9), transparent 70%);
}

.card-header h6 {
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.25px;
}

[data-collapse] {
  transition: height 0.25s ease;
  overflow: hidden;
}

.personel-birthday-badge {
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.personel-birthday-badge .personel-birthday-icon {
  color: currentColor;
  transition: transform 0.18s ease;
}

.table.bordered-table tbody tr:hover .personel-birthday-badge,
.personel-birthday-badge:hover {
  background-color: var(--color-warning-50, #fffbeb);
  border-color: var(--color-warning-300, #fcd34d);
  color: var(--color-warning-700, #b45309);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.16);
  transform: translateY(-1px);
}

.table.bordered-table tbody tr:hover .personel-birthday-badge .personel-birthday-icon,
.personel-birthday-badge:hover .personel-birthday-icon {
  transform: scale(1.08);
}
