.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.modal-overlay[hidden] { display: none; }

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-5);
  box-shadow: var(--shadow-float);
  animation: modal-slide-up 0.2s ease-out;
}

@keyframes modal-slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-section {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

.modal-section .quick-input-field { margin-bottom: var(--space-3); }

.modal-section-total {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
}

.modal-section-total strong {
  color: var(--color-text);
}

.modal-reset {
  width: 100%;
  margin-top: var(--space-2);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  text-decoration: underline;
  padding: var(--space-1);
}

.modal-close {
  width: 100%;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius-pill);
  padding: var(--space-3);
  font-weight: 700;
  margin-top: var(--space-2);
}

.modal-close:active {
  transform: scale(0.98);
}
