/* FIR Montevideo – Exámenes ATC (front + panel)
 * Estilos mínimos, respetando la maquetación de la intranet.
 */

.mvd-exams-form,
.mvd-exams-history-wrapper,
.mvd-exams-block {
  font-family: "Overpass", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #111827;
}

.mvd-exams-field {
  margin-bottom: 8px;
}

.mvd-exams-field > label {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}

.mvd-exams-select,
.mvd-exams-textarea,
.mvd-exams-input-file {
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  font-family: inherit;
  font-size: 13px;
}

.mvd-exams-textarea {
  resize: vertical;
  min-height: 70px;
}

.mvd-exams-help {
  margin: 4px 0 0;
  font-size: 11px;
  color: #6b7280;
}

.mvd-exams-actions {
  margin-top: 10px;
}

.mvd-exams-button-primary,
.mvd-exams-button-secondary,
.mvd-exams-link-button,
.mvd-exams-link-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  background: #2b587d;
  color: #ffffff;
  line-height: 1.3;
}

.mvd-exams-button-secondary {
  background: #f3f4f6;
  color: #111827;
  border-color: #d1d5db;
}

.mvd-exams-link-button {
  background: transparent;
  border-color: transparent;
  color: #2563eb;
  padding: 0 4px;
}

.mvd-exams-link-danger {
  background: transparent;
  border-color: transparent;
  color: #b91c1c;
  padding: 0 4px;
}

.mvd-exams-link-disabled {
  color: #9ca3af;
  font-size: 12px;
  margin: 0 4px;
}

.mvd-exams-button-primary:hover,
.mvd-exams-button-secondary:hover,
.mvd-exams-link-button:hover,
.mvd-exams-link-danger:hover {
  filter: brightness(0.96);
}

.mvd-exams-form-message {
  margin-top: 6px;
  font-size: 12px;
}

.mvd-exams-message-success {
  color: #059669;
}

.mvd-exams-message-error {
  color: #b91c1c;
}

.mvd-exams-message-pending {
  color: #4b5563;
}

/* Tabla historial */

.mvd-exams-history-wrapper {
  width: 100%;
  overflow-x: auto;
}

.mvd-exams-history-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 12px;
}

.mvd-exams-history-table th,
.mvd-exams-history-table td {
  border: 1px solid #e5e7eb;
  padding: 4px 6px;
  text-align: left;
  vertical-align: top;
  background: #ffffff;
}

.mvd-exams-history-table th {
  background: #f3f4f6;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.mvd-exams-history-table tr:nth-child(even) td {
  background: #f9fafb;
}

.mvd-exams-empty-row td {
  text-align: center;
  font-style: italic;
  color: #6b7280;
}

.mvd-exams-col-status {
  white-space: nowrap;
}

.mvd-exams-col-notes {
  max-width: 260px;
}

.mvd-exams-col-doc a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.mvd-exams-col-doc a:hover {
  text-decoration: underline;
}

/* Fila de edición inline */

.mvd-exams-edit-row td {
  background: #f9fafb;
}

.mvd-exams-edit-panel {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-gap: 8px;
  align-items: flex-start;
}

.mvd-exams-edit-panel > label {
  grid-column: span 2;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.mvd-exams-edit-panel > select,
.mvd-exams-edit-panel > textarea,
.mvd-exams-edit-panel > input[type="file"] {
  grid-column: span 10;
}

.mvd-exams-edit-actions {
  grid-column: span 12;
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .mvd-exams-edit-panel {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .mvd-exams-edit-panel > label {
    grid-column: span 6;
  }

  .mvd-exams-edit-panel > select,
  .mvd-exams-edit-panel > textarea,
  .mvd-exams-edit-panel > input[type="file"] {
    grid-column: span 6;
  }
}

/* Loader overlay (AJAX) */
.mvd-exams-history-wrapper{ position: relative; }
.mvd-exams-history-wrapper.is-loading{ pointer-events:none; opacity:0.88; }
.mvd-exams-loading{
  position:absolute; inset:0;
  display:none;
  align-items:center; justify-content:center;
  gap:0px;
  background:rgba(255,255,255,.72);
  backdrop-filter: blur(2px);
  border-radius:12px;
  z-index:10;
}
.mvd-exams-history-wrapper.is-loading .mvd-exams-loading{ display:flex; }
.mvd-exams-loading-box{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:18px 22px;
  border-radius:16px;
  background:rgba(255,255,255,.95);
  border:1px solid rgba(103,149,186,.40);
  box-shadow:0 10px 30px rgba(43,88,125,.18);
}

.mvd-exams-spinner{
  width:64px; height:64px;
  border-radius:50%;
  border:8px solid #6795ba;
  border-top-color:#2b587d;
  animation:mvd-exams-spin .8s linear infinite;
}
@keyframes mvd-exams-spin{ to{ transform:rotate(360deg);} }

.mvd-exams-delete-file-inline{ margin-left:8px; }

/* Filtros de historial */
.mvd-exams-history-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
}
.mvd-exams-history-title{
  font-size:18px;
  font-weight:800;
  color:#2b587d;
}
.mvd-exams-filters{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:12px;
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(103,149,186,.35);
  background:#f8fafc;
  margin-bottom:12px;
}
.mvd-exams-filter{ grid-column: span 3; min-width:0; }
.mvd-exams-filter-actions{ grid-column: span 3; display:flex; flex-direction:column; }
.mvd-exams-filter label{
  display:block;
  font-size:12px;
  font-weight:700;
  color:#2b587d;
  margin-bottom:6px;
}
.mvd-exams-input{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(43,88,125,.25);
  background:#fff;
  font-family:inherit;
  outline:none;
}
.mvd-exams-input:focus,
.mvd-exams-select:focus{
  border-color:#6795ba;
  box-shadow:0 0 0 3px rgba(103,149,186,.25);
}
.mvd-exams-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:10px;
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
  border:1px solid rgba(43,88,125,.25);
  background:#fff;
  color:#2b587d;
  font-family:inherit;
  white-space:nowrap;
}
.mvd-exams-btn-secondary:hover{ background:#f1f5f9; }
@media (max-width: 960px){
  .mvd-exams-filter{ grid-column: span 6; }
  .mvd-exams-filter-actions{ grid-column: span 6; }
}
@media (max-width: 560px){
  .mvd-exams-filter{ grid-column: span 12; }
  .mvd-exams-filter-actions{ grid-column: span 12; }
}

.mvd-exams-loading-text{ font-weight:700; color:#2b587d; font-size:16px; }


/* --------------------------------------------------------------------------
   0.9.13 — Ajuste visual filtros (más discreto, sin título interno)
--------------------------------------------------------------------------- */
.mvd-exams-filters{
  padding: 10px 12px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(248,250,252,.55);
  border-radius: 12px;
  box-shadow: none;
}

.mvd-exams-filter label{
  font-size: 12px;
  font-weight: 600;
  color: rgba(43,88,125,.85);
  margin-bottom: 4px;
}

.mvd-exams-input,
.mvd-exams-select{
  height: 36px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(17,24,39,.14);
  background: #fff;
  box-shadow: none;
}

.mvd-exams-input:focus,
.mvd-exams-select:focus{
  outline: none;
  border-color: rgba(103,149,186,.90);
  box-shadow: 0 0 0 3px rgba(103,149,186,.20);
}

.mvd-exams-filter-actions label{
  display: none;
}

.mvd-exams-filter-clear{
  height: 36px;
  padding: 8px 14px;
  border-radius: 10px;
}


/* --------------------------------------------------------------------------
   0.9.13 — Selector Alumno (autocomplete)
--------------------------------------------------------------------------- */
.mvd-exams-filter-user{
  position: relative;
  grid-column: span 2;
}

.mvd-exams-suggest{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(17,24,39,.12);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  max-height: 260px;
  overflow: auto;
  z-index: 50;
}

.mvd-exams-suggest-item{
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid rgba(17,24,39,.06);
}

.mvd-exams-suggest-item:last-child{
  border-bottom: 0;
}

.mvd-exams-suggest-item:hover{
  background: rgba(103,149,186,.10);
}


/* 0.9.19 — Alumno filtro historial: select desde DB */
.mvd-exams-filters{ align-items: end; }
