/**
 * Shared UI styles for ExamAIdedEvaluation
 * Load after Tailwind CDN. Used across edit-eval, new-eval, meta-evaluaciones,
 * grados, padrones, rubricas, config, momento1-review, wizard, batch pages, pdfgen.
 */

body {
  font-family: system-ui, sans-serif;
}

/* Cards */
.card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid #334155;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Form labels */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Form inputs (base) */
input[type="text"],
input[type="number"],
input[type="file"],
select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  background: #020617;
  color: #f1f5f9;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

input:focus,
select:focus {
  border-color: #10b981;
  outline: none;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

/* Helper text */
.help {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

/* Row divider */
.row {
  border-bottom: 1px solid #1e293b;
  padding: 1.5rem 0;
}

.row:last-child {
  border-bottom: none;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.toast,
.toast.success {
  background: #065f46;
  color: #6ee7b7;
  border: 1px solid #064e3b;
}

.toast.error {
  background: #7f1d1d;
  color: #fecaca;
  border: 1px solid #991b1b;
}

/* Slide message (pdfgen) - emerald palette */
.slide-msg {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.slide-msg.show {
  opacity: 1;
  visibility: visible;
}

.slide-msg.success {
  background: #065f46;
  color: #6ee7b7;
  border: 1px solid #064e3b;
}

.slide-msg.error {
  background: #7f1d1d;
  color: #fecaca;
  border: 1px solid #991b1b;
}

/* Empty state */
.empty {
  padding: 2rem;
  border-radius: 1rem;
  border: 1px dashed #334155;
  font-size: 0.875rem;
  color: #94a3b8;
  margin-top: 1rem;
  text-align: center;
  background: rgba(30, 41, 59, 0.4);
}

/* Pills (status badges) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.pill-abierta {
  background: #422006;
  color: #facc15;
}

.pill-cerrada {
  background: #064e3b;
  color: #6ee7b7;
}

.pill-other {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th,
td {
  padding: 0.75rem;
  border-bottom: 1px solid #1e293b;
  text-align: left;
}

th {
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
}

tr:hover td {
  background: rgba(2, 6, 23, 0.4);
}

/* Tooltip (detail panels, dashboard) */
.tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

.tooltip-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  font-size: 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: rgba(248, 250, 252, 0.9);
  background: rgba(30, 41, 59, 0.8);
  align-items: center;
  justify-content: center;
  cursor: default;
}

.tooltip-bubble {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, -6px);
  white-space: normal;
  min-width: 180px;
  max-width: 240px;
  padding: 6px 8px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 6px;
  font-size: 10px;
  color: #e2e8f0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}

.tooltip-wrapper:hover .tooltip-bubble,
.tooltip-wrapper:focus-within .tooltip-bubble {
  opacity: 1;
  transform: translate(-50%, 0);
}
