/* ระบบจัดการข้อสอบ – สไตล์เสริมจาก Tailwind (glassmorphism สีชมพู) */

.glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

/* ---- ฟอร์ม ---- */
.label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}
.label .req { color: #e11d5f; }

.input,
.select,
.textarea {
  width: 100%;
  border-radius: 0.9rem;
  border: 1.5px solid #e7d5dd;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.7rem 0.95rem;
  font-size: 0.95rem;
  color: #1e293b;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.textarea { min-height: 7rem; resize: vertical; line-height: 1.7; }
.input::placeholder, .textarea::placeholder { color: #b8a5ae; }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: #f43f74;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(244, 63, 116, 0.13);
}
.input:disabled, .select:disabled, .textarea:disabled { background: #f6f2f4; color: #94a3b8; }

/* ---- ปุ่ม ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.9rem;
  padding: 0.7rem 1.4rem;
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s, box-shadow .18s, background .18s, color .18s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, #f43f74, #be124e);
  color: #fff;
  box-shadow: 0 10px 22px -8px rgba(190, 18, 78, .6);
}
.btn-primary:hover { box-shadow: 0 14px 26px -8px rgba(190, 18, 78, .7); }
.btn-ghost { background: rgba(255,255,255,.8); color: #475569; border-color: #e7d5dd; }
.btn-ghost:hover { background: #fff; color: #be124e; border-color: #fda4bd; }
.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; }
.btn-danger  { background: #e11d48; color: #fff; }
.btn-danger:hover { background: #be123c; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; border-radius: 0.7rem; }

/* ---- ตัวเลือกคำตอบ (radio เฉลย) ---- */
.answer-pick input { position: absolute; opacity: 0; pointer-events: none; }
.answer-pick span {
  display: grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 0.8rem;
  border: 1.5px solid #e7d5dd;
  background: rgba(255,255,255,.9);
  font-weight: 700; color: #64748b;
  cursor: pointer;
  transition: all .18s;
}
.answer-pick input:checked + span {
  background: linear-gradient(135deg, #f43f74, #be124e);
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 18px -6px rgba(190,18,78,.7);
  transform: scale(1.06);
}
.answer-pick input:focus-visible + span { box-shadow: 0 0 0 4px rgba(244,63,116,.25); }

/* ---- ตาราง ---- */
.table-wrap { overflow-x: auto; border-radius: 1.1rem; border: 1px solid #f3dfe7; background: rgba(255,255,255,.75); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data thead th {
  background: linear-gradient(135deg, #fff1f6, #ffe4ee);
  color: #9f1247; font-weight: 700; text-align: left;
  padding: 0.85rem 1rem; white-space: nowrap;
}
table.data tbody td { padding: 0.85rem 1rem; border-top: 1px solid #f7e6ed; vertical-align: top; }
table.data tbody tr:hover { background: rgba(255, 241, 246, .7); }

/* ---- อื่น ๆ ---- */
.stat-card { border-radius: 1.25rem; padding: 1.25rem; border: 1px solid rgba(255,255,255,.8); backdrop-filter: blur(12px); }
.bar-track { height: .6rem; border-radius: 999px; background: #fbe3ec; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #fb7199, #be124e); transition: width .6s ease; }

@media print {
  body { background: #fff !important; }
  .no-print, nav, footer, header .animate-floaty { display: none !important; }
  main { box-shadow: none !important; border: none !important; background: #fff !important; }
}
