:root {
  --felix-bg: #f6f7fb;
  --felix-surface: #ffffff;
  --felix-border: rgba(67, 89, 113, 0.16);
  --felix-border-soft: rgba(67, 89, 113, 0.09);
  --felix-text: #243447;
  --felix-muted: #697a8d;
  --felix-primary: #5f61e6;
  --felix-teal: #00a6a6;
  --felix-success: #2f9e63;
  --felix-warning: #b87503;
  --felix-danger: #d3455b;
  --felix-shadow: 0 0.125rem 0.75rem rgba(67, 89, 113, 0.08);
}

html,
body {
  background: var(--felix-bg);
  color: var(--felix-text);
  letter-spacing: 0;
}

body {
  font-size: 0.925rem;
}

a {
  text-underline-offset: 0.18em;
}

.layout-page {
  background: var(--felix-bg);
}

.container-p-y {
  padding-top: 1.35rem !important;
  padding-bottom: 1.35rem !important;
}

.content-footer {
  border-top: 1px solid var(--felix-border-soft);
}

.felix-brand-mark {
  inline-size: 2.25rem;
  block-size: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--felix-primary), var(--felix-teal));
  color: #fff;
  font-weight: 700;
  flex: 0 0 auto;
}

.felix-brand-subtitle {
  color: var(--felix-muted);
  font-size: 0.72rem;
  line-height: 1;
}

.layout-navbar {
  border: 1px solid var(--felix-border-soft);
  box-shadow: var(--felix-shadow);
}

.layout-navbar .nav-link {
  border-radius: 8px;
}

.layout-navbar .nav-link:hover {
  background: rgba(67, 89, 113, 0.06);
}

.menu-vertical {
  border-inline-end: 1px solid var(--felix-border-soft);
}

.menu .app-brand {
  min-height: 4.25rem;
}

.menu .menu-header {
  margin-top: 0.75rem;
}

.menu .menu-header-text {
  color: var(--felix-muted);
  font-weight: 700;
  letter-spacing: 0;
}

.menu .menu-link {
  border-radius: 8px;
  margin-inline: 0.7rem;
}

.menu .menu-sub .menu-link {
  margin-inline: 0.45rem;
}

.menu .menu-item.active > .menu-link:not(.menu-toggle),
.menu .menu-item.active.open > .menu-link.menu-toggle {
  box-shadow: none;
}

.menu .menu-item.active > .menu-link,
.menu .menu-item.open > .menu-link.menu-toggle {
  font-weight: 700;
}

.felix-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.felix-page-title {
  margin: 0;
  color: var(--felix-text);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}

.felix-page-subtitle {
  margin: 0.35rem 0 0;
  color: var(--felix-muted);
}

.felix-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.row.g-6 {
  --bs-gutter-x: 1.25rem;
  --bs-gutter-y: 1.25rem;
}

.card {
  border: 1px solid var(--felix-border-soft);
  border-radius: 8px;
  box-shadow: var(--felix-shadow);
}

.card-header {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--felix-border-soft);
  background: var(--felix-surface);
}

.card-body {
  padding: 1.25rem;
}

.card-title,
.card-header h5,
.card-body h6 {
  color: var(--felix-text);
  font-weight: 700;
  letter-spacing: 0;
}

.card-header .card-title {
  font-size: 1rem;
}

.card-header small,
.text-body-secondary,
.form-text {
  color: var(--felix-muted) !important;
}

.row.g-6.mb-6:first-child .card,
.dashboard-kpi,
.quick-action {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.row.g-6.mb-6:first-child .card:hover,
.dashboard-kpi:hover,
.quick-action:hover {
  border-color: rgba(95, 97, 230, 0.28);
  box-shadow: 0 0.45rem 1.35rem rgba(67, 89, 113, 0.12);
  transform: translateY(-1px);
}

.avatar.rounded,
.dashboard-icon {
  border-radius: 8px !important;
}

.btn {
  border-radius: 7px;
  font-weight: 600;
  letter-spacing: 0;
}

.btn-icon,
.btn-sm.btn-icon {
  inline-size: 2.25rem;
  block-size: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-sm.btn-icon {
  inline-size: 2rem;
  block-size: 2rem;
}

.btn-primary {
  box-shadow: 0 0.25rem 0.75rem rgba(95, 97, 230, 0.18);
}

.btn-outline-secondary {
  border-color: var(--felix-border);
  color: #536579;
}

.btn-outline-secondary:hover {
  background: #eef1f5;
  border-color: var(--felix-border);
  color: var(--felix-text);
}

.dropdown-menu {
  border: 1px solid var(--felix-border-soft);
  border-radius: 8px;
  box-shadow: 0 0.5rem 1.5rem rgba(67, 89, 113, 0.16);
}

.dropdown-item {
  border-radius: 6px;
  margin-inline: 0.35rem;
  width: calc(100% - 0.7rem);
}

.card-header form[method="get"] .input-group {
  min-width: 17rem;
}

.card-header form[method="get"] input[type="date"].form-control {
  min-width: 10rem;
}

.card-header .btn-group {
  gap: 0;
}

.form-label,
.col-form-label {
  margin-bottom: 0.4rem;
  color: var(--felix-text);
  font-size: 0.82rem;
  font-weight: 700;
}

.form-control,
.form-select,
select.form-control {
  border-color: rgba(67, 89, 113, 0.18);
  border-radius: 7px;
  color: var(--felix-text);
}

.form-control:focus,
.form-select:focus,
select.form-control:focus {
  border-color: rgba(95, 97, 230, 0.58);
  box-shadow: 0 0 0 0.2rem rgba(95, 97, 230, 0.12);
}

.form-control[readonly],
.form-control:disabled,
.form-select:disabled,
fieldset:disabled .form-control,
fieldset:disabled .form-select {
  background-color: #f7f8fb;
  color: #66788a;
}

.input-group-text {
  border-color: rgba(67, 89, 113, 0.18);
  background: #f8fafc;
  color: var(--felix-muted);
}

.form-check-input {
  border-radius: 6px;
}

.form-switch .form-check-input {
  border-radius: 2rem;
}

.errorlist {
  margin: 0.35rem 0 0;
  padding: 0;
  color: var(--felix-danger);
  font-size: 0.78rem;
  list-style: none;
}

.table-responsive,
.card-datatable {
  border-radius: 0 0 8px 8px;
}

.table {
  color: var(--felix-text);
}

.table > :not(caption) > * > * {
  padding: 0.85rem 1rem;
  border-bottom-color: var(--felix-border-soft);
  vertical-align: middle;
}

.table thead.table-light th,
.table .table-light th,
.table thead th {
  background-color: #f8fafc !important;
  color: #536579;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: rgba(95, 97, 230, 0.045);
  color: var(--felix-text);
}

.table-row-link {
  cursor: pointer;
  outline: 0;
}

.table-row-link:hover td,
.table-row-link:focus td {
  background-color: rgba(95, 97, 230, 0.055);
}

.table-row-link:hover td:first-child,
.table-row-link:focus td:first-child {
  box-shadow: inset 3px 0 0 var(--felix-primary);
}

.table-row-link:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(95, 97, 230, 0.45);
}

.badge {
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0;
}

.alert {
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
}

.modal-content {
  border: 1px solid var(--felix-border-soft);
  border-radius: 8px;
  box-shadow: 0 1rem 2.5rem rgba(67, 89, 113, 0.2);
}

.modal-header {
  border-bottom-color: var(--felix-border-soft);
}

.modal-body .table-responsive {
  border: 1px solid var(--felix-border-soft);
  border-radius: 8px;
}

.felix-form-grid {
  display: grid;
  gap: 1rem;
}

.felix-section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--felix-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.felix-section-label::before {
  content: "";
  inline-size: 0.45rem;
  block-size: 0.45rem;
  border-radius: 999px;
  background: var(--felix-teal);
}

.felix-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.9rem;
  border: 1px solid var(--felix-border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 -0.35rem 1.4rem rgba(67, 89, 113, 0.08);
  backdrop-filter: blur(8px);
}

.felix-summary-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.felix-summary-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--felix-border-soft);
}

.felix-summary-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.felix-summary-label {
  color: var(--felix-muted);
  font-size: 0.78rem;
}

.felix-summary-value {
  color: var(--felix-text);
  font-weight: 700;
  text-align: right;
}

.felix-empty-state {
  padding: 2.5rem 1rem !important;
  color: var(--felix-muted);
}

.felix-empty-state i {
  display: block;
  margin-bottom: 0.5rem;
  color: rgba(67, 89, 113, 0.38);
  font-size: 2rem;
}

.felix-paste-zone {
  border: 1px dashed rgba(67, 89, 113, 0.3) !important;
  background: #f8fafc !important;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.felix-paste-zone:focus,
.felix-paste-zone:hover {
  border-color: rgba(95, 97, 230, 0.55) !important;
  background: #f4f6ff !important;
  outline: 0;
}

.felix-auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(0, 166, 166, 0.16), transparent 28rem),
    linear-gradient(135deg, #f8fafc 0%, #eef1f7 100%);
}

.felix-auth-card {
  width: min(100%, 28rem);
}

.felix-auth-card .card {
  overflow: hidden;
}

.felix-auth-header {
  padding: 1.25rem 1.25rem 0;
}

.felix-kanban-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 100px;
  padding: 1.15rem 1.25rem;
  background: var(--felix-surface);
  border: 1px solid var(--felix-border-soft);
  border-radius: 12px;
  box-shadow: var(--felix-shadow);
}

.felix-kanban-stat strong {
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--felix-text);
}

.felix-kanban-stat-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9px;
  font-size: 1.2rem;
}

.felix-kanban-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.felix-kanban-search {
  width: min(25rem, 100%);
}

.felix-kanban-priority {
  width: 12rem;
}

.felix-kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(285px, 1fr));
  gap: 1rem;
  overflow-x: auto;
  padding: 0.1rem 0.1rem 0.9rem;
  scrollbar-width: thin;
}

.felix-kanban-column {
  --kanban-accent: var(--felix-primary);
  min-height: 390px;
  overflow: hidden;
  background: #f1f3f8;
  border: 1px solid var(--felix-border-soft);
  border-radius: 13px;
  transition: background-color 0.15s ease, outline-color 0.15s ease;
}

.felix-kanban-column[data-estado="EN_CURSO"] {
  --kanban-accent: #3983c9;
}

.felix-kanban-column[data-estado="EN_ESPERA"] {
  --kanban-accent: #d39224;
}

.felix-kanban-column[data-estado="BLOQUEADA"] {
  --kanban-accent: var(--felix-danger);
}

.felix-kanban-column[data-estado="TERMINADO"],
.felix-kanban-column[data-estado="ENTREGADO"] {
  --kanban-accent: var(--felix-success);
}

.felix-kanban-column.is-drop-target {
  background: #e8ebff;
  outline: 2px dashed var(--kanban-accent);
  outline-offset: -4px;
}

.felix-kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 3px solid var(--kanban-accent);
}

.felix-kanban-column-header h5 {
  font-size: 0.93rem;
  font-weight: 700;
}

.felix-kanban-column-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--kanban-accent);
}

.felix-kanban-count {
  min-width: 1.65rem;
  padding: 0.2rem 0.45rem;
  border-radius: 20px;
  background: rgba(67, 89, 113, 0.1);
  color: var(--felix-text);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.felix-kanban-column-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 300px;
  padding: 0 0.7rem 0.8rem;
}

.felix-kanban-card {
  padding: 1rem;
  background: var(--felix-surface);
  border: 1px solid var(--felix-border-soft);
  border-radius: 11px;
  box-shadow: 0 3px 12px rgba(38, 49, 78, 0.05);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.felix-kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(38, 49, 78, 0.1);
}

.felix-kanban-card.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.felix-kanban-private {
  color: var(--felix-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.felix-kanban-card-title {
  display: block;
  color: var(--felix-text);
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1.35;
}

.felix-kanban-card-description {
  margin: 0.55rem 0 0;
  color: var(--felix-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.felix-kanban-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--felix-border-soft);
  color: var(--felix-muted);
  font-size: 0.76rem;
}

.felix-kanban-related-link {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.78rem;
}

.felix-kanban-move-form {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.felix-kanban-move-form .form-select {
  min-width: 0;
}

.felix-kanban-column-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 115px;
  border: 1px dashed rgba(67, 89, 113, 0.25);
  border-radius: 10px;
  color: var(--felix-muted);
  font-size: 0.8rem;
}

.felix-kanban-column-empty i,
.felix-kanban-empty-icon i {
  font-size: 1.6rem;
}

.felix-kanban-first-empty {
  padding: 3rem 1rem;
  background: var(--felix-surface);
  border: 1px dashed var(--felix-border);
  border-radius: 13px;
}

.felix-kanban-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 13px;
  background: rgba(95, 97, 230, 0.1);
  color: var(--felix-primary);
}

.felix-process-card {
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--felix-border-soft);
  border-radius: 10px;
  background: #fafbfe;
}

.felix-checklist-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--felix-border-soft);
  font-size: 0.85rem;
}

@media (max-width: 991.98px) {
  .felix-kanban-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .felix-kanban-board {
    grid-template-columns: repeat(4, minmax(280px, 75vw));
  }

  .felix-page-header {
    flex-direction: column;
  }

  .felix-toolbar,
  .card-header > .d-flex,
  .card-header > div.d-flex {
    width: 100%;
  }

  .card-header form[method="get"] {
    width: 100%;
  }

  .card-header .input-group {
    width: 100%;
  }

  .btn-group {
    flex-wrap: wrap;
  }

  .btn-group > .btn {
    border-radius: 7px !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 575.98px) {
  .container-p-y {
    padding-inline: 1rem !important;
  }

  .card-header,
  .card-body {
    padding: 1rem;
  }

  .felix-form-actions {
    justify-content: stretch;
  }

  .felix-form-actions .btn {
    flex: 1 1 auto;
  }

  .table > :not(caption) > * > * {
    padding: 0.75rem;
  }
}
