body {
  background: #f7f8fa;
  color: #20242a;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.app-brand {
  align-items: center;
  display: inline-flex;
  gap: .65rem;
}

.app-brand-logo,
.login-brand-logo {
  background: #ffffff;
  border-radius: 999px;
  object-fit: contain;
}

.app-brand-logo {
  height: 32px;
  padding: 2px;
  width: 32px;
}

.icon-sprite {
  display: none;
}

.app-shell {
  display: block;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid #d9dee7;
  flex: 0 0 284px;
  flex-direction: column;
  gap: .35rem;
  height: calc(100vh - 56px);
  max-height: calc(100vh - 56px);
  min-height: calc(100vh - 56px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: .75rem;
  position: sticky;
  top: 56px;
  transition: flex-basis .18s ease, width .18s ease;
  width: 284px;
}

.sidebar-nav {
  display: grid;
  gap: .2rem;
}

.sidebar a {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: .375rem;
  color: #2d3748;
  display: flex;
  gap: .7rem;
  min-height: 42px;
  padding: .55rem .75rem;
  position: relative;
  text-decoration: none;
  width: 100%;
}

.sidebar a:hover {
  background: #eef2f7;
}

.sidebar a.is-active {
  background: #eaf6ee;
  color: #17623a;
  font-weight: 700;
}

.sidebar a.is-active::before {
  background: #2e8b57;
  border-radius: 999px;
  bottom: .5rem;
  content: "";
  left: .28rem;
  position: absolute;
  top: .5rem;
  width: 3px;
}

.navbar-nav .nav-link.is-active {
  background: rgba(255, 255, 255, .14);
  border-radius: .375rem;
  color: #ffffff;
  font-weight: 700;
  padding-left: .75rem;
  padding-right: .75rem;
}

.sidebar-footer {
  background: #ffffff;
  border-top: 1px solid #e4e7ec;
  margin-top: auto;
  padding-top: .65rem;
  position: sticky;
  bottom: 0;
  z-index: 1;
}

.sidebar-toggle {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
  color: #475467;
  display: flex;
  height: 42px;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
  width: 42px;
}

.sidebar-toggle:hover {
  background: #eef2f7;
  border-color: #c7ceda;
  color: #111827;
}

.sidebar-icon {
  flex: 0 0 20px;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.sidebar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-section {
  color: #667085;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: .9rem .75rem .35rem;
  min-height: 18px;
  text-transform: uppercase;
}

.app-main {
  min-width: 0;
  width: 100%;
}

@media (min-width: 768px) {
  .app-shell {
    display: flex;
  }

  .app-main {
    flex: 1 1 auto;
  }
}

html.sidebar-collapsed-preload .sidebar,
body.sidebar-collapsed .sidebar {
  flex-basis: 86px;
  width: 86px;
}

html.sidebar-collapsed-preload .sidebar a,
body.sidebar-collapsed .sidebar a {
  align-content: center;
  flex-direction: column;
  gap: .28rem;
  justify-content: center;
  min-height: 64px;
  padding: .5rem .4rem;
}

html.sidebar-collapsed-preload .sidebar a.is-active::before,
body.sidebar-collapsed .sidebar a.is-active::before {
  left: .2rem;
}

html.sidebar-collapsed-preload .sidebar a .sidebar-label,
body.sidebar-collapsed .sidebar a .sidebar-label {
  display: none;
}

html.sidebar-collapsed-preload .sidebar a::after,
body.sidebar-collapsed .sidebar a::after {
  color: currentColor;
  content: attr(data-short-label);
  display: -webkit-box;
  font-size: .64rem;
  font-weight: 600;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.12;
  max-width: 76px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: normal;
}

html.sidebar-collapsed-preload .sidebar-section .sidebar-label,
body.sidebar-collapsed .sidebar-section .sidebar-label {
  display: none;
}

.mobile-menu-section {
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #98a2b3;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  margin-top: .55rem;
  padding: .7rem .75rem .25rem;
  text-transform: uppercase;
}

.mobile-menu .nav-link {
  align-items: center;
  display: flex;
  gap: .65rem;
  position: relative;
}

.mobile-menu-icon {
  fill: none;
  flex: 0 0 18px;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.mobile-menu form {
  margin: 0;
}

.mobile-menu-logout {
  border: 0;
  width: 100%;
}

.mobile-chat-badge {
  margin-left: auto;
  position: static;
}

html.sidebar-collapsed-preload .sidebar-section,
body.sidebar-collapsed .sidebar-section {
  border-top: 1px solid #e4e7ec;
  margin: .75rem .35rem .35rem;
}

html.sidebar-collapsed-preload .sidebar-toggle .sidebar-icon,
body.sidebar-collapsed .sidebar-toggle .sidebar-icon {
  transform: rotate(180deg);
}

.status-card {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: .5rem;
  padding: 1rem;
  min-height: 96px;
  min-width: 0;
}

.dashboard-page {
  min-width: 0;
}

.not-found-page {
  align-items: center;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr);
  margin: 4rem auto;
  max-width: 980px;
}

.not-found-code {
  color: #2e8b57;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 800;
  letter-spacing: .04em;
  line-height: .9;
  margin: 0 0 .75rem;
}

.not-found-copy h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: .75rem;
}

.not-found-copy > p:not(.not-found-code) {
  color: #667085;
  max-width: 30rem;
}

.not-found-game {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: .6rem;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .08);
  outline: none;
  overflow: hidden;
  padding: 1rem;
}

.not-found-game:focus-visible {
  box-shadow: 0 0 0 3px rgba(46, 139, 87, .25), 0 8px 24px rgba(16, 24, 40, .08);
}

.not-found-game-header,
.not-found-game-controls {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.not-found-game-header {
  color: #344054;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

.not-found-game-header strong {
  color: #2e8b57;
}

.not-found-game-stage {
  background: linear-gradient(#f8fafc 0 72%, #eef2f7 72% 100%);
  border: 1px solid #e4e7ec;
  border-radius: .4rem;
  height: 210px;
  overflow: hidden;
  position: relative;
  touch-action: manipulation;
}

.not-found-ground {
  background: #667085;
  bottom: 20px;
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
}

.not-found-player,
.not-found-obstacle {
  bottom: 22px;
  position: absolute;
  z-index: 1;
}

.not-found-player {
  background: #2e8b57;
  border-radius: .35rem .35rem .2rem .2rem;
  height: 30px;
  left: 12%;
  width: 26px;
}

.not-found-player::before,
.not-found-player::after {
  background: #17623a;
  bottom: -5px;
  content: "";
  height: 7px;
  position: absolute;
  width: 5px;
}

.not-found-player::before {
  left: 4px;
}

.not-found-player::after {
  right: 4px;
}

.not-found-obstacle {
  background: #c2410c;
  border-radius: .2rem .2rem 0 0;
  height: 34px;
  left: 0;
  width: 18px;
}

.not-found-obstacle::before,
.not-found-obstacle::after {
  background: #c2410c;
  content: "";
  height: 16px;
  position: absolute;
  top: 8px;
  width: 7px;
}

.not-found-obstacle::before {
  left: -5px;
}

.not-found-obstacle::after {
  right: -5px;
}

.not-found-game-message {
  color: #667085;
  font-size: .8rem;
  left: 1rem;
  margin: 0;
  position: absolute;
  right: 1rem;
  text-align: center;
  top: 40%;
}

.not-found-game-controls {
  gap: .75rem;
  justify-content: flex-end;
  margin-top: .75rem;
}

.status-card span {
  display: block;
  color: #657083;
  font-size: .875rem;
}

.status-card strong {
  display: block;
  margin-top: .35rem;
  overflow-wrap: anywhere;
}

.dashboard-section-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dashboard-section-header p,
.monitoring-note {
  color: #667085;
  margin-bottom: 0;
}

.dashboard-section-header h2 {
  margin-bottom: .25rem;
}

.metric-card {
  border-left: 4px solid #98a2b3;
}

.metric-card small {
  color: #667085;
  display: block;
  margin-top: .45rem;
}

.metric-gauge {
  --metric-rotation: calc((var(--metric-value) * 1.8deg) - 90deg);
  align-items: center;
  display: grid;
  justify-items: center;
  margin: .6rem auto 0;
  max-width: 150px;
  position: relative;
}

.metric-gauge-arc {
  aspect-ratio: 2 / 1;
  background:
    radial-gradient(circle at 50% 100%, #fff 0 48%, transparent 49%),
    conic-gradient(from 270deg at 50% 100%, #2e8b57 0 144deg, #d9822b 144deg 162deg, #c2410c 162deg 180deg, transparent 180deg);
  border-radius: 999px 999px 0 0;
  height: 58px;
  width: 116px;
}

.metric-gauge-needle {
  background: #20242a;
  border-radius: 999px;
  bottom: 1.6rem;
  height: 46px;
  left: 56px;
  position: absolute;
  transform: rotate(var(--metric-rotation));
  transform-origin: 50% 100%;
  width: 3px;
}

.metric-gauge::after {
  background: #20242a;
  border: 3px solid #ffffff;
  border-radius: 999px;
  bottom: 1.35rem;
  content: "";
  height: 13px;
  left: 52px;
  position: absolute;
  width: 13px;
}

.metric-gauge strong {
  font-size: 1rem;
  margin-top: .25rem;
}

.metric-gauge-threshold {
  color: #667085;
  font-size: .68rem;
  font-weight: 700;
  position: absolute;
  top: 1.95rem;
}

.metric-gauge-threshold-warning {
  right: 1.85rem;
}

.metric-gauge-threshold-critical {
  right: .42rem;
}

.metric-storage-kpi {
  align-items: center;
  display: flex;
  gap: .85rem;
  justify-content: center;
  margin-top: .5rem;
  max-width: 180px;
  width: 100%;
}

.metric-storage-kpi strong {
  order: 1;
}

.metric-storage-barrel {
  background: linear-gradient(90deg, #eef2f7 0, #ffffff 48%, #d9dee7 100%);
  border: 1px solid #98a2b3;
  border-radius: 0 0 999px 999px / 0 0 18px 18px;
  box-shadow: inset -10px 0 16px rgba(71, 84, 103, .12);
  height: 48px;
  order: 2;
  position: relative;
  width: 72px;
}

.metric-storage-barrel::before,
.metric-storage-barrel::after {
  border: 1px solid #98a2b3;
  border-radius: 50%;
  content: "";
  height: 18px;
  left: -1px;
  position: absolute;
  width: 72px;
}

.metric-storage-barrel::before {
  background: linear-gradient(90deg, #d9dee7 0, #ffffff 52%, #c7ceda 100%);
  top: -9px;
}

.metric-storage-barrel::after {
  background: transparent;
  border-top: 0;
  bottom: -9px;
}

.metric-storage-barrel span {
  background: linear-gradient(90deg, transparent 0, rgba(46, 139, 87, .15) 50%, transparent 100%);
  display: block;
  height: 100%;
  position: relative;
  z-index: 1;
}

.metric-card-normal {
  border-left-color: #2e8b57;
}

.metric-card-advertencia {
  border-left-color: #d9822b;
}

.metric-card-critico {
  border-left-color: #c2410c;
}

.metric-card-desconocido {
  border-left-color: #98a2b3;
}

.health-service-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px;
}

.health-traffic-light {
  align-items: center;
  background: #20242a;
  border-radius: 999px;
  display: flex;
  gap: .45rem;
  margin: .75rem 0 .15rem;
  padding: .35rem;
  width: max-content;
}

.health-traffic-light i {
  background: #667085;
  border-radius: 999px;
  display: block;
  height: 18px;
  opacity: .35;
  width: 18px;
}

.health-traffic-light i:first-child.is-on {
  background: #2e8b57;
  box-shadow: 0 0 0 4px rgba(46, 139, 87, .12);
  opacity: 1;
}

.health-traffic-light i:last-child.is-on {
  background: #c2410c;
  box-shadow: 0 0 0 4px rgba(194, 65, 12, .12);
  opacity: 1;
}

.health-service-card small {
  color: #667085;
  display: block;
  margin-top: .45rem;
}

.admin-summary-card,
.admin-chart-card {
  height: 100%;
  min-height: 178px;
}

.admin-employee-status {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.admin-employee-status div {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: .45rem;
  padding: .7rem;
}

.admin-employee-status strong {
  font-size: 1.35rem;
  margin-top: 0;
}

.admin-employee-status small {
  color: #667085;
}

.admin-bar-chart {
  align-items: end;
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 1rem;
  min-height: 112px;
}

.admin-bar-item {
  align-items: center;
  display: grid;
  gap: .25rem;
  justify-items: center;
  min-width: 0;
}

.admin-bar-value {
  color: #20242a;
  font-size: .72rem;
  font-weight: 800;
  min-height: 18px;
  overflow-wrap: anywhere;
  text-align: center;
}

.admin-bar-track {
  align-items: end;
  background: #eef2f7;
  border-radius: 999px 999px .25rem .25rem;
  display: flex;
  height: 72px;
  overflow: hidden;
  width: 18px;
}

.admin-bar-fill {
  border-radius: inherit;
  min-height: 3px;
  width: 100%;
}

.admin-bar-fill-reviewed {
  background: #2e8b57;
}

.admin-bar-fill-pending {
  background: #c2410c;
}

.admin-bar-label {
  color: #667085;
  font-size: .7rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-empty,
.history-item span,
.history-item time {
  color: #667085;
}

.history-modal-body {
  max-height: min(68vh, 620px);
  overflow-y: auto;
}

.history-list {
  display: grid;
  gap: .65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.history-item {
  align-items: center;
  border-left: 3px solid #2e8b57;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .15rem 0 .15rem .75rem;
}

.history-item strong,
.history-item span {
  display: block;
}

.history-item strong {
  color: #151a22;
}

.history-item .history-item-detail {
  color: #475467;
  font-size: .9rem;
  margin-top: .15rem;
}

.history-item time {
  flex: 0 0 auto;
  font-size: .9rem;
}

.payroll-summary-section,
.payroll-detail-section {
  margin-top: 1rem;
}

.payroll-detail-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.payroll-payment-table-wrap {
  max-width: 100%;
}

.payroll-payment-table th,
.payroll-payment-table td {
  white-space: nowrap;
}

.payroll-payment-table .payroll-sunday-column {
  background: #fff7ed;
}

.payroll-payment-table .payroll-column-totals-row th {
  background: #f8fafc;
  border-bottom: 1px solid #cfd7e3;
  color: #111827;
  font-weight: 700;
}

.payroll-payment-table .payroll-column-totals-row th.payroll-sunday-column {
  background: #fff7ed;
}

.payroll-payment-table tbody tr.payroll-septimo-row > td {
  background: #eff6ff;
}

.payroll-payment-table tbody tr.payroll-septimo-row > td.payroll-sunday-column {
  background: #dbeafe;
}

.payroll-day-value {
  direction: ltr;
  display: inline-flex;
  gap: .3rem;
}

.payroll-cosecha-mark {
  align-items: center;
  background: #ecfdf3;
  border: 1px solid #86efac;
  border-radius: .25rem;
  color: #166534;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 800;
  height: 1.15rem;
  justify-content: center;
  vertical-align: middle;
  width: 1.15rem;
}

.payroll-payment-proof {
  color: #475467;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}

.deduction-info-block {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: .5rem;
  box-shadow: 0 1px 2px rgb(16 24 40 / 4%);
  overflow: hidden;
}

.deduction-overview {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #e4e7ec;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.1rem;
}

.deduction-overview h3 {
  color: #151a22;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .2rem;
}

.deduction-overview p {
  color: #667085;
  margin: 0;
}

.deduction-detail-list {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr));
  margin: 0;
  padding: 1rem 1.1rem .75rem;
}

.deduction-detail-list > div {
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: .45rem;
  min-height: 4.3rem;
  padding: .7rem .75rem;
}

.deduction-detail-list dt {
  color: #667085;
  font-size: .78rem;
  font-weight: 600;
  margin: 0 0 .3rem;
}

.deduction-detail-list dd {
  color: #151a22;
  font-size: .98rem;
  font-weight: 600;
  margin: 0;
}

.deduction-progress {
  padding: 0 1.1rem 1rem;
}

.deduction-progress-label {
  align-items: center;
  color: #667085;
  display: flex;
  font-size: .82rem;
  justify-content: space-between;
  margin-bottom: .35rem;
}

.deduction-progress-label strong {
  color: #151a22;
}

.deduction-progress-track {
  background: #eef2f6;
  border-radius: 999px;
  height: .45rem;
  overflow: hidden;
}

.deduction-progress-track span {
  background: #2e9360;
  display: block;
  height: 100%;
}

.deduction-note {
  margin-left: 1rem;
  margin-right: 1rem;
}

.deduction-action {
  background: #ffffff;
  border-top: 1px solid #e4e7ec;
  display: grid;
  gap: .75rem;
  padding: 1rem 1.1rem;
}

.deduction-action-header {
  border-left: 3px solid #f97066;
  padding-left: .65rem;
}

.deduction-action h4 {
  color: #151a22;
  font-size: .95rem;
  font-weight: 700;
  margin: 0 0 .15rem;
}

.deduction-action p {
  color: #667085;
  font-size: .86rem;
  margin: 0;
}

.deduction-action-footer {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .deduction-overview {
    align-items: flex-start;
    flex-direction: column;
  }

  .deduction-detail-list {
    grid-template-columns: 1fr;
  }

  .deduction-detail-list > div {
    border-bottom: 1px solid #eef2f6;
  }
}

.inline-edit-form {
  align-items: center;
  display: flex;
  gap: .35rem;
  min-width: 16rem;
}

.inline-edit-form .form-control {
  max-width: 7rem;
}

.history-empty {
  margin: 0;
}

.inline-icon {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.modal-subtitle {
  color: #667085;
  font-size: .9rem;
  margin: .15rem 0 0;
}

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

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.page-header h1 {
  color: #151a22;
  font-weight: 700;
  margin-bottom: .25rem;
}

.page-subtitle {
  color: #667085;
  margin: 0;
}

.table-surface {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: .5rem;
  overflow: hidden;
}

.app-table {
  min-width: 760px;
}

.app-table thead th {
  background: #f8fafc;
  color: #475467;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-table tbody td {
  color: #344054;
  font-size: .92rem;
  padding-bottom: .85rem;
  padding-top: .85rem;
}

.table-strong {
  color: #151a22;
  font-weight: 700;
}

.table-count {
  color: #151a22;
  font-weight: 800;
}

.table-action {
  color: #1f2937;
  font-weight: 700;
  text-decoration: none;
}

.table-action:hover {
  color: #111827;
  text-decoration: underline;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  padding: .35rem .55rem;
}

.date-select-control {
  display: grid;
  gap: .5rem;
  grid-template-columns: minmax(72px, .7fr) minmax(130px, 1.2fr) minmax(92px, .8fr);
  width: 100%;
}

.date-select-control select {
  background-color: #fff;
  border: 1px solid #d0d5dd;
  border-radius: .375rem;
  color: #20242a;
  min-height: 42px;
  padding: .5rem .75rem;
  width: 100%;
}

.date-select-control select:focus {
  border-color: #98a2b3;
  box-shadow: 0 0 0 .2rem rgb(152 162 179 / 18%);
  outline: 0;
}

.status-active {
  background: #e8f5ee;
  color: #17643a;
}

.status-muted {
  background: #eef2f7;
  color: #475467;
}

.status-deleted {
  background: #fbeaea;
  color: #9f1d1d;
}

.empty-table {
  color: #667085;
  padding: 2rem !important;
  text-align: center;
}

.admin-section {
  margin-top: 1rem;
}

.admin-section-header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.admin-section-header h2 {
  color: #151a22;
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 .2rem;
}

.admin-section-header p {
  color: #667085;
  margin: 0;
}

.view-toggle {
  align-items: center;
  background: #eef2f7;
  border: 1px solid #d9dee7;
  border-radius: .5rem;
  display: inline-flex;
  gap: .15rem;
  padding: .2rem;
}

.view-toggle-option {
  border-radius: .375rem;
  color: #475467;
  font-size: .88rem;
  font-weight: 800;
  min-height: 34px;
  padding: .4rem .75rem;
  text-decoration: none;
}

.view-toggle-option:hover {
  color: #151a22;
}

.view-toggle-option.active {
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
  color: #151a22;
}

.position-activity-grid {
  display: grid;
  gap: .75rem;
}

.position-activity-drawer {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: .5rem;
  overflow: hidden;
}

.position-activity-drawer summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: .75rem;
  grid-template-columns: auto minmax(140px, 1fr) auto auto auto;
  list-style: none;
  min-height: 58px;
  padding: .85rem 1rem;
}

.position-activity-drawer summary::-webkit-details-marker {
  display: none;
}

.position-activity-drawer summary:hover {
  background: #f8fafc;
}

.drawer-chevron {
  border-bottom: 2px solid #475467;
  border-right: 2px solid #475467;
  display: inline-block;
  height: 9px;
  transform: rotate(-45deg);
  transition: transform .16s ease;
  width: 9px;
}

.position-activity-drawer[open] .drawer-chevron {
  transform: rotate(45deg);
}

.drawer-title {
  color: #151a22;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.drawer-count {
  color: #667085;
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
}

.drawer-action {
  justify-self: end;
}

.drawer-body {
  border-top: 1px solid #e4e7ec;
}

.position-activity-table {
  min-width: 980px;
}

.activity-panel {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: .5rem;
  margin-top: 1rem;
  overflow: hidden;
}

.activity-panel-empty {
  color: #667085;
  padding: 1.25rem;
}

.activity-panel-empty h2 {
  color: #151a22;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: .25rem;
}

.activity-panel-empty p {
  margin: 0;
}

.activity-panel-header {
  align-items: flex-start;
  border-bottom: 1px solid #e4e7ec;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.activity-panel-header h2 {
  color: #151a22;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 .2rem;
}

.activity-panel-header p,
.activity-section-header p {
  color: #667085;
  margin: 0;
}

.activity-panel-actions,
.activity-section-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: space-between;
}

.activity-summary-grid {
  border-bottom: 1px solid #e4e7ec;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 1rem 1.25rem;
}

.activity-summary-grid span:first-child {
  color: #667085;
  display: block;
  font-size: .78rem;
  font-weight: 800;
  margin-bottom: .25rem;
  text-transform: uppercase;
}

.activity-summary-grid strong {
  color: #151a22;
  display: block;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.activity-panel-section {
  border-bottom: 1px solid #e4e7ec;
  padding: 1rem 1.25rem;
}

.activity-panel-section:last-child {
  border-bottom: 0;
}

.activity-section-header {
  margin-bottom: .75rem;
}

.activity-section-header h3 {
  color: #151a22;
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 .2rem;
}

.activity-config-table {
  min-width: 860px;
}

.table-row-selected td {
  background: #f8fafc;
}

.table-row-toggle svg {
  transition: transform .16s ease;
}

.table-row-toggle.active svg {
  transform: rotate(90deg);
}

.table-detail-row > td {
  background: #fbfcfe;
  border-top: 0;
  padding: 0 !important;
}

.position-inline-detail {
  border-top: 1px solid #e4e7ec;
  padding: .75rem;
}

.position-inline-detail-header {
  align-items: center;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.position-inline-detail .position-activity-table th,
.position-inline-detail .position-activity-table td,
.position-inline-detail .loan-installments-inline-table th,
.position-inline-detail .loan-installments-inline-table td {
  border-right: 0;
  white-space: nowrap;
}

.position-inline-detail .position-activity-table th,
.position-inline-detail .loan-installments-inline-table th {
  background: #f8fafc;
  border-bottom: 2px solid #d0d5dd;
  color: #344054;
  font-size: .72rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.position-inline-detail .position-activity-table tbody tr:nth-child(even) > td,
.position-inline-detail .loan-installments-inline-table tbody tr:nth-child(even) > td {
  background: #fbfcfe;
}

.loan-installments-detail h3 {
  font-size: .95rem;
  margin: 0;
}

.loan-installments-inline-table th,
.loan-installments-inline-table td,
.loan-payment-info-table th,
.loan-payment-info-table td {
  white-space: nowrap;
}

.loan-installments-inline-table {
  min-width: 900px;
  table-layout: fixed;
}

.loan-installments-inline-table .loan-installment-number {
  color: #475467;
  font-weight: 700;
}

.loan-installment-col-number {
  width: 7%;
}

.loan-installment-col-money,
.loan-installment-col-balance {
  width: 17%;
}

.loan-installment-col-status {
  width: 14%;
}

.loan-installment-col-date {
  width: 18%;
}

.loan-installment-col-action {
  width: 10%;
}

.loan-installments-inline-table tbody tr.loan-installment-partial-row > td {
  background: #fff7ed;
  border-bottom-color: #fed7aa;
}

.loan-installments-inline-table tbody tr.loan-installment-partial-row > td:first-child {
  box-shadow: inset 4px 0 0 #f97316;
}

.activity-empty-state {
  border: 1px dashed #cfd6e1;
  border-radius: .5rem;
  color: #667085;
  padding: 1rem;
}

.activity-empty-state p {
  margin: 0 0 .75rem;
}

.form-surface {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: .5rem;
  padding: 1.25rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-section {
  border-bottom: 1px solid #e4e7ec;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
}

.form-section h2 {
  color: #151a22;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.form-field {
  min-width: 0;
}

.form-field label {
  color: #344054;
  display: block;
  font-size: .875rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.form-field input:not([type="checkbox"]),
.form-field select,
.form-field textarea {
  border: 1px solid #cfd6e1;
  border-radius: .375rem;
  color: #151a22;
  min-height: 42px;
  padding: .6rem .7rem;
  width: 100%;
}

.form-field textarea {
  resize: vertical;
}

.form-help {
  color: #667085;
  font-size: .85rem;
  margin: .35rem 0 0;
}

.document-list {
  border-top: 1px solid #e4e7ec;
  margin-top: 1rem;
  padding-top: 1rem;
}

.document-list h3 {
  color: #344054;
  font-size: .95rem;
  font-weight: 800;
  margin-bottom: .5rem;
}

.document-list ul {
  color: #475467;
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.identity-document-upload {
  display: grid;
  gap: .5rem;
}

.identity-document-field {
  grid-column: 1 / -1;
}

.identity-document-upload-row {
  align-items: center;
  display: grid;
  gap: .5rem;
  grid-template-columns: minmax(13rem, 1fr) minmax(12rem, 1fr) auto;
  max-width: 100%;
}

.identity-document-upload-row input[type="file"] {
  width: 100%;
  min-width: 0;
}

.identity-document-name {
  border: 1px solid #d0d5dd;
  border-radius: .375rem;
  box-sizing: border-box;
  color: #344054;
  min-height: 34px;
  min-width: 0;
  padding: .35rem .5rem;
  width: 100%;
}

.identity-document-clear {
  align-items: center;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: .375rem;
  color: #667085;
  display: inline-flex;
  font-size: 1.25rem;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.identity-document-clear:hover,
.identity-document-clear:focus {
  border-color: #98a2b3;
  color: #101828;
}

.employee-document-existing-list {
  display: grid;
  gap: .45rem;
}

.employee-document-existing-list li {
  align-items: center;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  min-height: 2.25rem;
}

.employee-document-delete {
  align-items: center;
  border: 1px solid #f04438;
  border-radius: .375rem;
  color: #b42318;
  cursor: pointer;
  display: inline-flex;
  font-size: .85rem;
  font-weight: 700;
  gap: .35rem;
  padding: .3rem .55rem;
}

.employee-document-delete input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.employee-document-delete:has(input:checked) {
  background: #fef3f2;
}

@media (max-width: 640px) {
  .identity-document-upload-row {
    grid-template-columns: 1fr auto;
  }

  .identity-document-name {
    grid-column: 1 / -1;
  }
}

.employee-document-image {
  background: #101828;
  border-radius: .375rem;
  display: block;
  max-height: 70vh;
  object-fit: contain;
  width: 100%;
}

.employee-document-label {
  color: #344054;
  font-size: .9rem;
  font-weight: 800;
  margin-top: .5rem;
  text-align: center;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #475467;
  box-shadow: 0 0 0 3px rgb(71 84 103 / 12%);
  outline: none;
}

.worklog-mobile-flow {
  display: grid;
  gap: .75rem;
}

.worklog-wizard {
  max-width: 980px;
}

.worklog-form-header {
  max-width: 980px;
}

.worklog-step {
  border: 1px solid #e4e7ec;
  border-radius: .5rem;
  padding: 1rem;
}

.worklog-step[hidden] {
  display: none !important;
}

.worklog-step.is-active {
  border-color: #b8c0cc;
  box-shadow: 0 1px 2px rgb(16 24 40 / 6%);
}

.worklog-step-heading {
  align-items: center;
  display: flex;
  gap: .55rem;
  margin-bottom: .75rem;
}

.worklog-step-heading h2 {
  color: #151a22;
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
}

.worklog-step-heading p {
  color: #667085;
  font-size: .9rem;
  margin: .15rem 0 0;
}

.worklog-step-number {
  align-items: center;
  background: #151a22;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: .8rem;
  font-weight: 800;
  height: 1.65rem;
  justify-content: center;
  width: 1.65rem;
}

.worklog-step-note {
  background: #f2f4f7;
  border-radius: .375rem;
  color: #344054;
  font-size: .9rem;
  margin: .75rem 0 0;
  padding: .65rem .75rem;
}

.worklog-search-help {
  color: #667085;
  font-size: .88rem;
  margin: .5rem 0 0;
}

.choice-native {
  display: none;
}

.choice-button-list {
  display: grid;
  gap: .6rem;
}

.choice-button {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #cfd6e1;
  border-radius: .5rem;
  color: #151a22;
  display: flex;
  flex-direction: column;
  font-weight: 700;
  justify-content: flex-start;
  min-height: 52px;
  padding: .75rem .85rem;
  text-align: left;
  width: 100%;
}

.choice-button.active {
  background: #151a22;
  border-color: #151a22;
  color: #ffffff;
}

.choice-button-label {
  display: block;
  font-size: .98rem;
  line-height: 1.25;
}

.choice-button-description {
  color: #667085;
  display: block;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: .25rem;
}

.choice-button.active .choice-button-description {
  color: #d0d5dd;
}

.choice-selected-label {
  color: #17643a;
  display: block;
  font-size: .78rem;
  font-weight: 800;
  margin-top: .35rem;
}

.choice-button.active .choice-selected-label {
  color: #ffffff;
}

.choice-button:focus {
  box-shadow: 0 0 0 3px rgb(71 84 103 / 18%);
  outline: none;
}

.selection-summary {
  background: #e8f5ee;
  border-radius: .375rem;
  color: #17643a;
  font-weight: 800;
  margin-top: .75rem;
  padding: .65rem .75rem;
}

@media (min-width: 768px) {
  .worklog-step {
    padding: 1.25rem;
  }

  .choice-button-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .worklog-step[data-worklog-step="empleado"] .choice-button-list,
  .worklog-step[data-worklog-step="proyecto"] .choice-button-list {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

.worklog-empty-message {
  color: #9f1d1d;
  font-size: .9rem;
  font-weight: 700;
  margin: .75rem 0 0;
}

.worklog-inactive-employee-alert {
  background: #fee4e2;
  border: 1px solid #fda29b;
  border-radius: .5rem;
  color: #9f1d1d;
  font-size: .92rem;
  font-weight: 800;
  margin-top: .75rem;
  padding: .7rem .85rem;
}

.worklog-search-input {
  border: 1px solid #cfd6e1;
  border-radius: .5rem;
  color: #151a22;
  margin-bottom: .6rem;
  min-height: 48px;
  padding: .7rem .85rem;
  width: 100%;
}

.stepper-control {
  align-items: center;
  display: grid;
  gap: .5rem;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
}

.stepper-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #98a2b3;
  border-radius: .5rem;
  color: #151a22;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 800;
  height: 52px;
  justify-content: center;
}

.stepper-button:focus {
  box-shadow: 0 0 0 3px rgb(71 84 103 / 18%);
  outline: none;
}

.review-list {
  display: grid;
  gap: .65rem;
  margin: 0;
}

.review-list div {
  border-bottom: 1px solid #eef2f7;
  display: grid;
  gap: .25rem;
  padding-bottom: .6rem;
}

.review-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.review-list dt {
  color: #667085;
  font-size: .82rem;
  font-weight: 800;
}

.review-list dd {
  color: #151a22;
  font-weight: 800;
  margin: 0;
}

.form-field-check {
  align-items: end;
  display: flex;
}

.check-control {
  align-items: center;
  display: inline-flex !important;
  gap: .5rem;
  margin: 0;
  min-height: 42px;
}

.check-control input {
  height: 18px;
  width: 18px;
}

.multi-check-list > div,
.multi-check-list li {
  list-style: none;
}

.multi-check-list ul {
  margin: 0;
  padding: 0;
}

.multi-check-list > div:not(.field-help) {
  border: 1px solid #cfd6e1;
  border-radius: .375rem;
  max-height: 220px;
  overflow: auto;
  padding: .35rem;
}

.multi-check-list label {
  align-items: center;
  border-radius: .25rem;
  color: #344054;
  display: flex;
  font-weight: 600;
  gap: .55rem;
  margin: 0;
  min-height: 36px;
  padding: .4rem .5rem;
}

.multi-check-list label:has(input:checked) {
  background: #f2f4f7;
  color: #151a22;
}

.multi-check-list input {
  height: 16px;
  width: 16px;
}

.field-help {
  color: #667085;
  font-size: .82rem;
  margin-top: .35rem;
}

.password-summary {
  color: #344054;
  font-weight: 700;
  margin-bottom: .65rem;
}

.field-error {
  color: #b42318;
  font-size: .85rem;
  margin-top: .35rem;
}

.form-actions {
  border-top: 1px solid #e4e7ec;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
}

.header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  justify-content: flex-end;
}

.calendar-layout {
  display: block;
}

.calendar-panel {
  align-self: start;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: .5rem;
  padding: .75rem;
}

.calendar-panel-wide {
  margin-bottom: 1rem;
  width: 100%;
}

.calendar-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.calendar-nav,
.calendar-view-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.calendar-period-title {
  color: #151a22;
  flex: 1 1 220px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
  text-align: center;
}

.calendar-grid {
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-head {
  color: #667085;
  font-size: .78rem;
  font-weight: 800;
  margin-bottom: .35rem;
  text-align: center;
}

.calendar-swipe-area {
  cursor: grab;
  touch-action: pan-y;
}

.calendar-swipe-area.is-dragging {
  cursor: grabbing;
}

.calendar-day {
  align-items: stretch;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: .5rem;
  color: #344054;
  display: flex;
  flex-direction: column;
  font-size: 1.05rem;
  font-weight: 800;
  gap: .35rem;
  justify-content: center;
  min-height: 68px;
  padding: .55rem .6rem;
  position: relative;
  text-decoration: none;
}

.calendar-day-approval {
  align-items: center;
  background: #166534;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 900;
  height: 1.15rem;
  justify-content: center;
  left: .35rem;
  line-height: 1;
  position: absolute;
  top: .35rem;
  width: 1.15rem;
}

.calendar-day-payroll {
  background: #dcfae6;
  border: 1px solid #abefc6;
  border-radius: 999px;
  color: #067647;
  font-size: .68rem;
  font-weight: 800;
  left: .35rem;
  line-height: 1;
  max-width: calc(100% - .7rem);
  overflow: hidden;
  padding: .18rem .4rem;
  position: absolute;
  text-overflow: ellipsis;
  top: .35rem;
  white-space: nowrap;
}

.calendar-day-number {
  display: block;
  line-height: 1;
  text-align: center;
}

.calendar-day-count {
  margin-top: 0;
}

.calendar-day-count,
.calendar-day-employees,
.calendar-day-money {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day-money {
  font-size: .68rem;
}

.calendar-day:hover {
  background: #f2f4f7;
  color: #151a22;
}

.calendar-muted {
  color: #98a2b3;
}

.calendar-has-records {
  background: #fff3e6;
  border-color: #ffd7a8;
  color: #9a4d00;
}

.calendar-closed {
  background: #e8f5ee;
  border-color: #b7dfc8;
  color: #166534;
}

.calendar-needs-review {
  background: #fee4e2;
  border-color: #fda29b;
  color: #b42318;
}

.calendar-selected {
  border-color: #151a22;
  box-shadow: inset 0 0 0 2px #151a22;
}

.calendar-selected:hover {
  border-color: #151a22;
  box-shadow: inset 0 0 0 2px #151a22;
}

.table-surface-full {
  width: 100%;
}

.table-controls {
  align-items: center;
  border-bottom: 1px solid #e4e7ec;
  display: block;
  min-height: 59px;
  padding: .75rem 1rem;
  position: relative;
}

.table-controls-main {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-right: 24rem;
}

.table-toggle {
  align-items: center;
  display: flex;
  gap: .45rem;
  min-height: 36px;
}

.table-toggle span {
  color: #344054;
  font-size: .85rem;
  font-weight: 800;
}

.table-page-size {
  align-items: center;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: .375rem;
  display: flex;
  min-height: 34px;
  overflow: hidden;
}

.table-page-size span {
  background: #f8fafc;
  border-right: 1px solid #d0d5dd;
  color: #475467;
  font-size: .85rem;
  font-weight: 800;
  line-height: 1;
  padding: .55rem .65rem;
}

.table-page-size select {
  background-color: #fff;
  border: 0;
  color: #151a22;
  font-weight: 800;
  min-height: 32px;
  padding: .35rem 1.85rem .35rem .6rem;
}

.table-page-size select:focus {
  box-shadow: none;
  outline: 2px solid #98a2b3;
  outline-offset: -2px;
}

.table-export-button {
  min-height: 34px;
}

.table-search {
  display: block;
}

.table-search input {
  border: 1px solid #d0d5dd;
  border-radius: .375rem;
  color: #151a22;
  min-height: 34px;
  min-width: 260px;
  padding: .35rem .7rem;
}

.table-search input:focus {
  box-shadow: none;
  outline: 2px solid #98a2b3;
  outline-offset: -2px;
}

.app-table tbody tr.row-warning-soft > td {
  background: #fff7ed;
}

.app-table tbody tr.row-danger-soft > td {
  background: #fee4e2;
}

.app-table tbody tr.row-success-soft > td {
  background: #dcfce7;
}

.table-control-actions,
.table-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.table-control-actions {
  justify-content: flex-end;
  position: absolute;
  right: 1rem;
  top: .75rem;
}

.table-sort {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: .35rem;
  text-decoration: none;
}

.table-sort:hover {
  color: #151a22;
}

.table-sort-muted {
  color: #98a2b3;
}

.table-pagination {
  align-items: center;
  border-top: 1px solid #e4e7ec;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
  padding: .9rem 1rem;
}

.table-page-summary {
  color: #667085;
  font-size: .9rem;
  font-weight: 700;
}

.icon-action {
  align-items: center;
  background: transparent;
  border: 1px solid #d0d5dd;
  border-radius: .375rem;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.icon-action.danger {
  color: #b42318;
}

.icon-action:hover {
  background: #f9fafb;
}

.icon-action:disabled,
.icon-action.disabled {
  background: #f2f4f7;
  color: #98a2b3;
  cursor: not-allowed;
  opacity: .7;
  pointer-events: none;
}

.inline-extra-hours,
.inline-extra-hours-form,
.inline-project,
.inline-project-form {
  align-items: center;
  display: inline-flex;
  gap: .35rem;
}

.inline-extra-hours-value,
.inline-project-value {
  min-width: 3.2rem;
}

.inline-extra-hours-input,
.inline-project-select {
  border: 1px solid #d0d5dd;
  border-radius: .375rem;
  color: #20242a;
  height: 34px;
  padding: .25rem .45rem;
}

.inline-extra-hours-input {
  width: 4.8rem;
}

.inline-project-select {
  max-width: 13rem;
  min-width: 10rem;
}

.inline-extra-hours-save,
.inline-project-save,
.inline-edit-save {
  border-color: #abefc6;
  color: #027a48;
}

.inline-extra-hours-save:hover,
.inline-project-save:hover,
.inline-edit-save:hover {
  background: #ecfdf3;
  border-color: #75e0a7;
}

.inline-extra-hours-cancel,
.inline-project-cancel,
.inline-edit-cancel {
  border-color: #fecdca;
  color: #b42318;
}

.inline-extra-hours-cancel:hover,
.inline-project-cancel:hover,
.inline-edit-cancel:hover {
  background: #fef3f2;
  border-color: #fda29b;
}

.payment-modal-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-summary-item {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: .5rem;
  padding: .75rem;
}

.payment-summary-item label {
  color: #667085;
  display: block;
  font-size: .78rem;
  font-weight: 800;
  margin-bottom: .25rem;
  text-transform: uppercase;
}

.payment-summary-value {
  color: #101828;
  font-size: 1.05rem;
  font-weight: 800;
  min-height: 1.5rem;
}

.payment-summary-loan-balance {
  grid-column: 2;
}

.payment-method-field,
.payment-modal-grid .form-field:has(textarea) {
  grid-column: 1 / -1;
}

.payment-method-options {
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payment-method-option {
  align-items: center;
  border: 1px solid #d0d5dd;
  border-radius: .5rem;
  cursor: pointer;
  display: flex;
  gap: .6rem;
  min-height: 42px;
  padding: .6rem .7rem;
  position: relative;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.payment-method-option:has(input:checked) {
  border-color: #101828;
  background: #f8fafc;
  box-shadow: 0 0 0 1px #101828;
}

.payment-method-option::before {
  border: 1.5px solid #98a2b3;
  border-radius: 999px;
  content: "";
  flex: 0 0 auto;
  height: 14px;
  width: 14px;
}

.payment-method-option:has(input:checked)::before {
  background: radial-gradient(circle at center, #2563eb 0 43%, transparent 47%);
  border-color: #2563eb;
  box-shadow: 0 0 0 3px #eff6ff;
}

.payment-method-option input {
  appearance: none;
  block-size: 0;
  clip-path: inset(50%);
  inline-size: 0;
  margin: 0;
  pointer-events: none;
  position: absolute;
}

.payment-method-option span {
  color: #344054;
  font-weight: 700;
}

.payment-method-option-disabled {
  background: #f8fafc;
  color: #667085;
  cursor: not-allowed;
}

.payment-method-option-disabled input {
  cursor: not-allowed;
}

.payment-method-option-disabled::before {
  border-color: #d0d5dd;
}

.payment-history-panel {
  border: 1px solid #eaecf0;
  border-radius: .5rem;
  grid-column: 1 / -1;
  padding: .75rem;
}

.payment-history-header h3 {
  color: #344054;
  font-size: .85rem;
  font-weight: 800;
  margin: 0 0 .5rem;
}

.worklog-danger-actions {
  border-top: 1px solid #fecdca;
  justify-content: flex-start;
  margin-top: 1rem;
  padding-top: 1rem;
}

.worklog-duplicate-alert {
  align-items: flex-start;
  display: flex;
  gap: .4rem;
  padding-right: 3rem;
}

.worklog-duplicate-alert strong {
  flex: 0 0 auto;
}

@media (max-width: 767.98px) {
  .app-main {
    padding-left: .75rem !important;
    padding-right: .75rem !important;
  }

  .not-found-page {
    gap: 1.5rem;
    grid-template-columns: 1fr;
    margin: 1.5rem auto;
  }

  .not-found-code {
    font-size: 4rem;
  }

  .not-found-game {
    padding: .75rem;
  }

  .dashboard-section-header {
    align-items: flex-start;
    display: grid;
    gap: .65rem;
    grid-template-columns: 1fr;
  }

  .dashboard-section-header .btn {
    justify-self: start;
    max-width: 100%;
  }

  .dashboard-page .row {
    --bs-gutter-x: .75rem;
  }

  .dashboard-page .status-card {
    padding: .85rem;
  }

  .dashboard-page .admin-chart-card {
    min-height: 164px;
  }

  .dashboard-page .admin-bar-chart {
    gap: .25rem;
    margin-top: .75rem;
  }

  .dashboard-page .admin-bar-value {
    font-size: .65rem;
  }

  .dashboard-page .admin-bar-label {
    font-size: .62rem;
  }

  .dashboard-page .health-service-card {
    min-height: 124px;
  }

  .dashboard-page .metric-card small,
  .dashboard-page .health-service-card small {
    overflow-wrap: anywhere;
  }

  .payment-summary-loan-balance {
    grid-column: 1;
  }

  .payment-method-options {
    grid-template-columns: 1fr;
  }

  .page-header,
  .admin-section-header,
  .activity-panel-header,
  .activity-section-header {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr;
  }

  .page-actions {
    justify-content: stretch;
  }

  .page-actions .btn {
    width: 100%;
  }

  .view-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .view-toggle-option {
    text-align: center;
  }

  .position-activity-drawer summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .drawer-count {
    grid-column: 2 / 4;
    white-space: normal;
  }

  .drawer-action {
    grid-column: 3;
    grid-row: 1;
  }

  .activity-panel {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    margin-left: -.75rem;
    margin-right: -.75rem;
  }

  .activity-panel-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .activity-panel-actions .btn,
  .activity-section-header .btn {
    width: 100%;
  }

  .activity-summary-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .table-controls {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .table-controls-main {
    padding-right: 0;
  }

  .table-search,
  .table-search input {
    width: 100%;
  }

  .table-control-actions {
    justify-content: flex-end;
    position: static;
  }

  .worklog-wizard {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    margin-left: -.75rem;
    margin-right: -.75rem;
    padding: .85rem;
  }

  .worklog-wizard .form-actions {
    align-items: stretch;
    display: grid;
    gap: .6rem;
  }

  .worklog-wizard .form-actions .btn {
    min-height: 50px;
    width: 100%;
  }

  .calendar-day {
    aspect-ratio: auto;
    font-size: .95rem;
    min-height: 44px;
    padding: .35rem .25rem;
  }

  .calendar-day-count {
    display: none;
  }

  .calendar-day-employees {
    font-size: .62rem;
  }

  .calendar-day-money {
    display: none;
  }
}

.auth-page {
  background: #f4f6f8;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.login-panel {
  width: min(100%, 400px);
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: .5rem;
  padding: 2rem;
}

.login-brand {
  align-items: center;
  color: #4d596a;
  display: flex;
  font-size: .875rem;
  font-weight: 700;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.login-brand-logo {
  height: 56px;
  width: 56px;
}

.login-panel h1 {
  color: #151a22;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.login-copy {
  color: #667085;
  font-size: .95rem;
  margin: .5rem 0 1.5rem;
}

.login-alert {
  border-radius: .375rem;
  font-size: .9rem;
  padding: .75rem;
}

.field-group {
  margin-bottom: 1rem;
}

.field-group label {
  display: block;
  color: #344054;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: .4rem;
}

.field-group input {
  width: 100%;
  border: 1px solid #cfd6e1;
  border-radius: .375rem;
  color: #151a22;
  font: inherit;
  min-height: 44px;
  padding: .65rem .75rem;
}

.field-group input:focus {
  border-color: #475467;
  box-shadow: 0 0 0 3px rgb(71 84 103 / 12%);
  outline: none;
}

.login-submit {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: .375rem;
  background: #1f2937;
  color: #ffffff;
  font-weight: 700;
  margin-top: .25rem;
}

.login-submit:hover {
  background: #111827;
}

.login-link {
  display: inline-block;
  color: #475467;
  font-size: .9rem;
  margin-top: 1rem;
  text-decoration: none;
}

.login-link:hover {
  color: #111827;
  text-decoration: underline;
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: block;
}

.chat-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: calc(100vh - 56px - 3rem);
  height: calc(100dvh - 56px - 3rem);
  min-height: 0;
}

.chat-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.chat-presence {
  align-items: center;
  color: #667085;
  display: flex;
  font-size: .9rem;
  gap: .5rem;
  padding-top: .35rem;
}

.chat-layout {
  display: grid;
  flex: 1 1 auto;
  gap: 1rem;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  min-height: 0;
}

.chat-people,
.chat-panel {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: .5rem;
}

.chat-people {
  padding: 1rem;
}

.chat-people h2 {
  color: #344054;
  font-size: .85rem;
  font-weight: 700;
  margin: 0 0 .75rem;
  text-transform: uppercase;
}

.chat-people ul {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chat-people li {
  align-items: center;
  color: #101828;
  display: flex;
  font-size: .95rem;
  gap: .45rem;
}

.chat-people li::before {
  background: #12b76a;
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: .55rem;
  width: .55rem;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.chat-thread {
  background: #f8fafc;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .75rem;
  overflow-y: auto;
  padding: 1rem;
}

.chat-message {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  max-width: min(72%, 680px);
}

.chat-message.is-own {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-message.is-deleted {
  color: #98a2b3;
  font-style: italic;
}

.chat-message-meta {
  color: #667085;
  display: flex;
  font-size: .78rem;
  gap: .5rem;
  margin: 0 .5rem .25rem;
}

.chat-delete-button {
  background: transparent;
  border: 0;
  color: #98a2b3;
  cursor: pointer;
  display: inline-flex;
  padding: 0;
}

.chat-delete-button:hover {
  color: #b42318;
}

.chat-delete-button svg,
.chat-file-download svg {
  fill: none;
  height: 1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1rem;
}

.chat-bubble {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 1.15rem;
  border-bottom-left-radius: .35rem;
  color: #101828;
  padding: .65rem .85rem;
}

.chat-message.is-own .chat-bubble {
  background: #0b84ff;
  border-color: #0b84ff;
  border-bottom-left-radius: 1.15rem;
  border-bottom-right-radius: .35rem;
  color: #ffffff;
}

.chat-message.is-deleted .chat-bubble {
  background: #f2f4f7;
  border-style: dashed;
  color: #98a2b3;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-attachment {
  display: block;
  margin-top: .5rem;
}

.chat-attachment:first-child {
  margin-top: 0;
}

.chat-attachment img {
  border-radius: .75rem;
  display: block;
  max-height: 280px;
  max-width: min(100%, 360px);
  object-fit: contain;
}

.chat-file-download {
  align-items: center;
  background: #f2f4f7;
  border: 1px solid #d0d5dd;
  border-radius: .5rem;
  color: #175cd3;
  display: inline-flex;
  gap: .45rem;
  margin-top: .5rem;
  max-width: 100%;
  overflow: hidden;
  padding: .45rem .6rem;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-file-download:hover {
  background: #eaf2ff;
  color: #1849a9;
}

.chat-status {
  color: #667085;
  font-size: .85rem;
  min-height: 1.5rem;
  padding: .35rem 1rem 0;
}

.chat-composer {
  align-items: end;
  border-top: 1px solid #e4e7ec;
  display: grid;
  gap: .5rem;
  grid-template-columns: 2.5rem 2.5rem minmax(0, 1fr) auto;
  padding: .75rem;
  position: relative;
}

.chat-emoji-picker {
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: .6rem;
  bottom: 4.3rem;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .14);
  display: grid;
  gap: .2rem;
  grid-template-columns: repeat(6, 2.25rem);
  left: .75rem;
  padding: .45rem;
  position: absolute;
  z-index: 5;
}

.chat-emoji-picker[hidden] {
  display: none;
}

.chat-emoji-option {
  background: transparent;
  border: 0;
  border-radius: .35rem;
  cursor: pointer;
  font-size: 1.25rem;
  height: 2.1rem;
  width: 2.1rem;
}

.chat-emoji-option:hover {
  background: #f2f4f7;
}

.chat-composer textarea {
  border: 1px solid #cfd6e1;
  border-radius: 1.25rem;
  max-height: 140px;
  min-height: 42px;
  padding: .6rem .9rem;
  resize: none;
}

.chat-icon-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #cfd6e1;
  border-radius: 999px;
  color: #344054;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.2rem;
  height: 2.5rem;
  justify-content: center;
  line-height: 1;
  width: 2.5rem;
}

.chat-icon-button:hover {
  background: #f2f4f7;
}

.chat-files {
  align-items: center;
  color: #667085;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  font-size: .78rem;
  grid-column: 3 / 5;
  min-height: 1rem;
}

.chat-file-item {
  align-items: center;
  background: #f2f4f7;
  border: 1px solid #d0d5dd;
  border-radius: .5rem;
  display: inline-flex;
  gap: .35rem;
  max-width: 100%;
  padding: .2rem .35rem .2rem .55rem;
}

.chat-file-item > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-file-remove {
  background: transparent;
  border: 0;
  color: #667085;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: .1rem .2rem;
}

.chat-file-remove:hover {
  color: #b42318;
}

.navbar-chat-notification {
  align-items: center;
  color: #ffffff;
  display: inline-flex;
  margin-right: 1rem;
  position: relative;
  text-decoration: none;
}

.navbar-chat-notification svg {
  fill: none;
  height: 1.35rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1.35rem;
}

.navbar-chat-notification:hover {
  color: #d0d5dd;
}

.navbar-chat-badge {
  align-items: center;
  background: #d92d20;
  border: 2px solid #212529;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: .65rem;
  font-weight: 700;
  height: 1.15rem;
  justify-content: center;
  min-width: 1.15rem;
  padding: 0 .2rem;
  position: absolute;
  right: -.55rem;
  top: -.55rem;
}

.navbar-chat-badge.is-hidden {
  display: none;
}

.user-menu-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: .375rem;
  color: #ffffff;
  display: inline-flex;
  gap: .5rem;
  padding: .3rem .55rem;
}

.user-menu-toggle:hover,
.user-menu-toggle:focus-visible {
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
}

.user-menu-initials {
  align-items: center;
  background: #ffffff;
  border-radius: 999px;
  color: #344054;
  display: inline-flex;
  font-size: .75rem;
  font-weight: 700;
  height: 1.8rem;
  justify-content: center;
  width: 1.8rem;
}

.dropdown-item-icon {
  align-items: center;
  display: flex;
  gap: .55rem;
}

.dropdown-item-icon svg {
  fill: none;
  flex: 0 0 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 1rem;
}

.nav-link .is-hidden {
  display: none;
}

@media (max-width: 767.98px) {
  .chat-header {
    flex-direction: column;
  }

  .chat-layout {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .chat-people {
    flex: 0 0 auto;
    max-height: 8rem;
    overflow-y: auto;
    order: 2;
  }

  .chat-panel {
    flex: 1 1 auto;
  }

  .chat-message {
    max-width: 88%;
  }

  .chat-composer {
    grid-template-columns: 2.4rem 2.4rem minmax(0, 1fr);
  }

  .chat-composer .btn {
    grid-column: 1 / 4;
  }

  .chat-files {
    grid-column: 1 / 4;
  }
}
