/* --- Modal de REPORTES --- */
.vm-report-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
.vm-report-modal.is-open {
  display: block;
}
.vm-report-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 16px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: saturate(120%) blur(4px);
    backdrop-filter: saturate(120%) blur(4px);
    align-items: center;
    justify-content: center;
}
.vm-report-content {
    position: relative;
    max-width: 480px;
    background: #fff;
    color: var(--vm-brand-900);
    border-radius: 16px;
    border: 1px solid var(--vm-border);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
    width: min(560px, 100%);
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.vm-report-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--vm-border);
    background: linear-gradient(180deg, #ffffff, #f9fafb);
}
.vm-report-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--vm-brand-900);
}

/* Botón cerrar */
.vm-report-close {
    border: none;
    background: transparent;
    font-size: 1rem;
    line-height: 1;
    color: #64748b;
    padding: 4px;
    border-radius: 999px;
    position: absolute;
    right: 20px;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
    box-shadow: none;
}
.vm-report-close:focus {
    background: transparent !important;
    color: #64748b;
}
.vm-report-close:hover {
    background: transparent;
    color: var(--vm-brand-900);
}

/* Body */
.vm-report-body {
    flex: 1 1 auto;
    padding: 16px 20px;
    overflow-y: auto;
}
.vm-report-body > p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--vm-muted);
}

/* Opciones de motivo */
.vm-report-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.vm-report-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--vm-brand);
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.vm-report-options label:hover {
  background: #eff6ff;
}
.vm-report-options input[type="radio"] {
  accent-color: var(--vm-accent);
}

/* Textarea */
.vm-report-textarea[hidden] {
  display: none !important;
}

.vm-report-textarea {
  width: 100%;
  min-height: 96px;
  margin-top: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid var(--vm-border);
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
  color: var(--vm-brand-900);
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease;
}
.vm-report-textarea:hover {
  border: 1px solid var(--vm-border-dark) !important;
}
.vm-report-textarea:focus {
  outline: none;
  border: 1px solid var(--vm-accent) !important;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

/* Footer acciones */
.vm-report-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--vm-border);
    background: #fff;
}

/* Botones Enviar y Cancelar */
.vm-report-submit, .vm-report-cancel {font-size: 0.95rem;font-weight: 600;padding: 10px 18px;border-radius: 999px;border: 1px solid transparent;cursor: pointer;display: inline-flex;align-items: center;justify-content: center;gap: 0.35rem;min-width: 0;box-shadow: none;transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.12s ease, transform 0.04s ease;}

.vm-report-cancel {background: #fff;border-color: var(--vm-border-dark) !important;color: var(--vm-brand-900);}
.vm-report-cancel:focus { background: #fff; border: 1px solid var(--vm-border-dark) !important; color: var(--vm-brand-900); }
.vm-report-cancel:hover { background: var(--vm-soft); border-color: var(--vm-border-dark); color: var(--vm-brand-900); }
.vm-report-cancel:active { background: #f0f6fc; border-color: var(--vm-border-dark); }

.vm-report-submit:focus { background: #1e56cf; border: 1px solid #1e56cf !important; }
.vm-report-submit:hover { background: #1e56cf; border-color: #1e56cf; }
.vm-report-submit:active { background: #1b4bd1; border-color: #1b4bd1; }
.vm-report-submit[disabled],
.vm-report-submit.vm-busy {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

/* Spinner integrado cuando vmSetBusy añade .vm-busy */
.vm-report-submit.vm-busy::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: #ffffff;
  animation: vm-report-spin 0.6s linear infinite;
}
@keyframes vm-report-spin {
  to { transform: rotate(360deg); }
}

@media screen and (max-width: 768px) {
    .vm-report-overlay { padding: 0; }
    .vm-report-content { max-width: none; max-height: 100%; width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
}