/* En escritorio el panel ocupa la altura disponible y deja el scroll dentro de
   los listados. Se conserva la estructura visual existente durante la extracción. */
@media (min-width: 992px) and (min-height: 600px) {
  .main-content:has(.employee-dashboard) {
    height: 100dvh;
    overflow: hidden;
    padding-bottom: 14px !important;
    padding-top: 20px !important;
  }

  .main-content:has(.employee-dashboard) #page-content {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
  }

  .employee-dashboard {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .employee-dashboard > div:nth-child(1) { margin-bottom: 8px !important; }
  .employee-dashboard > div:nth-child(1) h1 {
    font-size: clamp(1.15rem, 2vw, 1.45rem) !important;
    margin-bottom: 2px !important;
  }
  .employee-dashboard > div:nth-child(1) p { font-size: 13px !important; }
  .employee-dashboard .kpi-grid { gap: 10px !important; margin-bottom: 8px !important; }
  .employee-dashboard .kpi-card { min-height: 0 !important; padding: 10px 14px !important; }
  .employee-dashboard .kpi-card .kpi-label { font-size: 12px !important; margin-bottom: 2px !important; }
  .employee-dashboard #kpi-horas-sub { font-size: 11px !important; margin-top: 2px !important; }
  .employee-dashboard .kpi-value {
    font-size: clamp(1.4rem, 2.5vw, 1.95rem) !important;
    margin: 4px 0 !important;
  }
  .employee-dashboard .kpi-progress { margin-top: 0 !important; }
  .employee-dashboard .kpi-sub { margin-top: 4px !important; }
  .employee-dashboard .kpi-card .qa-btn {
    font-size: 12px !important;
    margin-top: 5px !important;
    min-height: 34px !important;
    padding: 5px 12px !important;
  }
  .employee-dashboard .kpi-card .qa-ico {
    font-size: 13px !important;
    height: 24px !important;
    width: 24px !important;
  }
  .employee-dashboard > div:nth-child(3) { margin-bottom: 8px !important; }
  .employee-dashboard > div:nth-child(3) h4 { margin-bottom: 8px !important; }
  .employee-dashboard .qa-row .qa-btn {
    font-size: 13px !important;
    min-height: 48px !important;
    padding: 8px 16px !important;
  }
  .employee-dashboard .qa-row .qa-ico {
    font-size: 15px !important;
    height: 30px !important;
    width: 30px !important;
  }
  .employee-dashboard > div:last-child {
    align-items: stretch;
    flex: 1 1 auto;
    max-height: calc(5 * 72px + 38px);
    min-height: 0;
    overflow: hidden;
  }
  .employee-dashboard > div:last-child > div {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .employee-dashboard > div:last-child h4 {
    flex-shrink: 0;
    margin-bottom: 10px !important;
  }
  .employee-dashboard > div:last-child .card,
  .employee-dashboard #panel-notificaciones-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
}

@media (min-width: 1200px) and (min-height: 600px) {
  .employee-dashboard .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .employee-dashboard .progress-circle {
    height: 100px !important;
    margin: 2px auto !important;
    width: 100px !important;
  }
  .employee-dashboard .progress-circle .inner-text { font-size: 17px !important; }
  .employee-dashboard #kpi-entrada-hora,
  .employee-dashboard #kpi-salida-prev {
    font-size: 19px !important;
    margin-top: 1px !important;
  }
  .employee-dashboard .kpi-hora-box { padding: 8px 10px !important; }
  .employee-dashboard .kpi-hora-box-label {
    font-size: 9px !important;
    gap: 4px !important;
    letter-spacing: .2px !important;
    white-space: nowrap !important;
  }
}

.employee-dashboard-loading,
.employee-dashboard-empty,
.employee-dashboard-error {
  color: var(--text-dim);
  font-size: 13px;
  padding: 32px;
  text-align: center;
}
.employee-dashboard-stale {
  background: var(--gold-tint);
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold-strong);
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  margin-left: 8px;
  padding: 2px 8px;
}
.employee-dashboard-stale[hidden] {
  display: none;
}

.employee-dashboard-holiday {
  align-items: center;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 999px;
  color: var(--purple);
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
}
.employee-dashboard-holiday[hidden] { display: none; }


.employee-dashboard-error {
  color: var(--danger);
}

.employee-dashboard-empty__icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.employee-dashboard-health-option {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text-strong);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  gap: 12px;
  padding: 14px 18px;
  text-align: left;
  width: 100%;
}

.employee-dashboard-health-option:first-child {
  border-bottom: 1px solid var(--border);
}

.employee-dashboard-health-option--sickness:hover {
  background: var(--danger-tint);
}

.employee-dashboard-health-option--appointment:hover {
  background: var(--gold-tint);
}

.employee-dashboard-health-option strong,
.employee-dashboard-health-option small {
  display: block;
}

.employee-dashboard-health-option small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 400;
}

.resumen-dia {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 14px 28px;
}

.resumen-dia--today {
  background: var(--surface-muted);
}

.resumen-dia__main {
  align-items: center;
  display: flex;
  gap: 16px;
}

.resumen-dia-ico {
  color: var(--text-dim);
  display: inline-flex;
  font-size: 20px;
  justify-content: center;
  width: 28px;
}

.resumen-dia--today .resumen-dia-ico {
  font-size: 22px;
}

.resumen-dia-nombre {
  font-size: 15px;
  font-weight: 900;
}

.resumen-dia-rango {
  color: var(--text-dim);
  font-size: 12px;
}

.resumen-dia-badge {
  align-items: center;
  background: var(--gold-tint);
  border: 0;
  border-radius: 999px;
  color: var(--text-strong);
  cursor: default;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  min-height: 32px;
  padding: 7px 16px;
  text-transform: uppercase;
  white-space: nowrap;
}

.resumen-dia-badge--in_progress,
.resumen-dia-badge--running {
  background: var(--success-tint);
  color: var(--success);
}

.resumen-dia-badge--missing_exit {
  background: rgba(245, 158, 11, 0.12);
  color: var(--orange);
}

.resumen-dia-badge--completed {
  background: var(--gold-tint);
  color: var(--text-strong);
}

.employee-dashboard-notification-scroll {
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-color: var(--text-muted) transparent;
  scrollbar-width: thin;
}

.employee-dashboard-notification {
  border-left: 4px solid var(--success);
  border-radius: 0 12px 12px 0;
  margin-bottom: 8px;
  overflow: hidden;
  padding: 14px 16px;
}

.employee-dashboard-notification--accepted {
  background: var(--success-tint);
}

.employee-dashboard-notification--pending {
  background: var(--gold-tint);
  border-left-color: var(--gold);
}

.employee-dashboard-notification--rejected {
  background: var(--danger-tint);
  border-left-color: var(--danger);
}

.employee-dashboard-notification__row {
  align-items: center;
  display: flex;
  gap: 12px;
}

.employee-dashboard-notification__icon {
  flex-shrink: 0;
  font-size: 18px;
}

.employee-dashboard-notification__content {
  flex: 1;
  min-width: 0;
}

.employee-dashboard-notification__title {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.employee-dashboard-notification__date {
  color: var(--text-dim);
  font-size: 11px;
  margin-top: 2px;
}

.employee-dashboard-notification__dismiss,
.employee-dashboard-notification__action,
.employee-dashboard-mark-all {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  cursor: pointer;
}

.employee-dashboard-notification__action {
  background:var(--gold);
  border:0;
  border-radius:8px;
  color:var(--bg-deep);
  cursor:pointer;
  flex:0 0 auto;
  font-size:11px;
  font-weight:900;
  padding:8px 11px;
}

.employee-dashboard-notification__detail {
  color:var(--text-muted);
  font-size:11px;
  line-height:1.4;
  margin-top:4px;
}

.employee-dashboard-notification__dismiss {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-shrink: 0;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.employee-dashboard-mark-all {
  border-radius: 6px;
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
}

.employee-dashboard-notification__dismiss:hover,
.employee-dashboard-mark-all:hover {
  color: var(--text-strong);
}

.employee-dashboard-notification-steps { align-items:center; display:flex; margin-top:10px }
.employee-dashboard-notification-step { align-items:center; color:var(--hover-overlay); display:flex; flex:0 0 auto; flex-direction:column; gap:4px; text-align:center }
.employee-dashboard-notification-step__marker { align-items:center; background:var(--hover-overlay); border-radius:50%; color:var(--text-strong); display:inline-flex; font-size:10px; font-weight:900; height:22px; justify-content:center; width:22px }
.employee-dashboard-notification-step__label { font-size:10px; font-weight:600; white-space:nowrap }
.employee-dashboard-notification-step--done { color:var(--success) }
.employee-dashboard-notification-step--done .employee-dashboard-notification-step__marker { background:var(--success) }
.employee-dashboard-notification-step--active { color:var(--gold); font-weight:900 }
.employee-dashboard-notification-step--active .employee-dashboard-notification-step__label { font-weight:900 }
.employee-dashboard-notification-step--active .employee-dashboard-notification-step__marker { background:var(--gold); box-shadow:0 0 8px var(--gold-tint) }
.employee-dashboard-notification-step__connector { background:var(--hover-overlay); flex:1 1 auto; height:2px; margin:0 4px 18px }
.employee-dashboard-notification-step__connector--done { background:var(--success) }
