/* Sheet de hora en móvil (evita picker nativo con «Establecer» cortado) */

.k1-time-sheet {
  border: none;
  padding: 0;
  margin: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  background: transparent;
}

.k1-time-sheet::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.k1-time-sheet__panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  margin: 0 auto;
  max-width: 32rem;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  padding-bottom: calc(
    1rem + env(safe-area-inset-bottom, 0px) + var(--module-mobile-nav-height, 3.5rem)
  );
  border-radius: 1rem 1rem 0 0;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
  pointer-events: auto;
}

/* Evita que la barra inferior del módulo intercepte Cancelar/Aceptar */
body.k1-time-sheet-open .app-module-mobile-nav,
body:has(#k1-time-sheet[open]) .app-module-mobile-nav {
  pointer-events: none;
  visibility: hidden;
}

body.k1-time-sheet-open input[type="time"].k1-time-sheet-source {
  pointer-events: none;
}

.k1-time-sheet__title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text-primary, #0f172a);
}

.k1-time-sheet__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.k1-time-sheet__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.k1-time-sheet__label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
}

.k1-time-sheet__select {
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 0.65rem;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  border-radius: 0.55rem;
  border: 1px solid var(--input-border, #cbd5e1);
  background: var(--input-bg, #fff);
  color: var(--text-primary, #0f172a);
}

.k1-time-sheet__select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.k1-time-sheet__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.k1-time-sheet__btn {
  min-height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 650;
  position: relative;
  z-index: 2;
  touch-action: manipulation;
  cursor: pointer;
}

@media (max-width: 360px) {
  .k1-time-sheet__actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .k1-time-sheet {
    display: none !important;
  }
}
