/* Student forms: shared by the admin, student portal and public pages. Plain CSS, so no Tailwind rebuild is needed. */
.sf-shell { max-width: 1200px; margin: 0 auto; }
.sf-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 18px; box-shadow: 0 10px 28px rgba(15, 23, 42, .06); }
.sf-card-pad { padding: 18px 20px; }
.sf-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; }
.sf-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.sf-section-title { font-size: 15px; font-weight: 800; color: var(--theme-color-1, #1D3557); }
.sf-section-help { width: 100%; font-size: 12px; color: #64748b; }
.sf-badge { display: inline-flex; border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 800; background: #eef2ff; color: #3730a3; }
.sf-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 16px; }
.sf-item { grid-column: span 6; min-width: 0; }
@media (min-width: 768px) {
  .sf-w-half { grid-column: span 3; }
  .sf-w-third { grid-column: span 2; }
}
.sf-item[hidden], .sf-other[hidden] { display: none !important; }
.sf-label { display: block; font-size: 12px; font-weight: 800; color: #334155; margin-bottom: 4px; }
.sf-req { color: #dc2626; }
.sf-note { font-size: 11.5px; color: #64748b; margin-top: 4px; }
.sf-input input[type=text], .sf-input input[type=email], .sf-input input[type=number], .sf-input input[type=date],
.sf-input input[type=time], .sf-input select, .sf-input textarea, .sf-table input, .sf-table select,
.sf-field-input {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 10px; padding: 8px 10px; font-size: 13px; background: #fff;
}
.sf-input textarea { min-height: 96px; }
.sf-input input:focus, .sf-input select:focus, .sf-input textarea:focus, .sf-table input:focus, .sf-table select:focus {
  outline: none; border-color: var(--theme-color-1, #1D3557); box-shadow: 0 0 0 3px rgba(29, 53, 87, .12);
}
.sf-type-radio ul, .sf-type-checkboxes ul, .sf-type-yes_no ul,
.sf-type-radio > div > div, .sf-type-checkboxes > div > div { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sf-type-radio label, .sf-type-checkboxes label, .sf-type-yes_no label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #1f2937; }
.sf-declaration { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #1f2937; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; }
.sf-declaration input { margin-top: 3px; }
.sf-info { background: #f8fafc; border-left: 4px solid var(--theme-color-1, #1D3557); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: #334155; }
.sf-info-title { font-weight: 800; margin-bottom: 4px; }
.sf-other { margin-top: 8px; }
.sf-item .errorlist { color: #dc2626; font-size: 12px; font-weight: 700; margin-top: 4px; list-style: none; padding: 0; }
.sf-signature-pad { display: block; width: 100%; max-width: 480px; height: 130px; border: 1px dashed #94a3b8; border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; }
.sf-signature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.sf-signature-img { max-width: 260px; max-height: 90px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.sf-table-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.sf-table-grid th { background: #f8fafc; text-align: left; font-size: 11px; font-weight: 900; color: #64748b; text-transform: uppercase; padding: 8px; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.sf-table-grid td { padding: 6px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.sf-table-grid td.sf-readonly { color: #334155; font-weight: 600; }
.sf-table-actions { margin-top: 8px; }
.sf-btn, .sf-btn-light, .sf-btn-danger { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 800; cursor: pointer; text-decoration: none; }
.sf-btn { background: var(--theme-color-1, #1D3557); color: #fff; border: 1px solid var(--theme-color-1, #1D3557); }
.sf-btn-light { background: #fff; color: #334155; border: 1px solid #cbd5e1; }
.sf-btn-danger { background: #fff; color: #b91c1c; border: 1px solid #fecaca; }
.sf-btn[disabled] { opacity: .6; cursor: wait; }
.sf-answers { display: grid; gap: 10px; }
.sf-answer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
@media (min-width: 768px) { .sf-answer { grid-template-columns: 260px minmax(0, 1fr); gap: 16px; } }
.sf-answer dt { font-size: 12px; font-weight: 800; color: #64748b; }
.sf-answer dd { font-size: 13px; color: #111827; margin: 0; overflow-wrap: anywhere; }
.sf-answer-table { border-collapse: collapse; font-size: 12.5px; }
.sf-answer-table th, .sf-answer-table td { border: 1px solid #e5e7eb; padding: 5px 8px; text-align: left; }
.sf-answer-table th { background: #f8fafc; font-weight: 800; color: #475569; }
.sf-empty { color: #94a3b8; }
.sf-link { color: var(--theme-color-2, #E63946); font-weight: 700; text-decoration: underline; }
.sf-pill { display: inline-flex; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.sf-pill-submitted { background: #fef3c7; color: #92400e; }
.sf-pill-in_review { background: #dbeafe; color: #1e40af; }
.sf-pill-awaiting_student { background: #ede9fe; color: #5b21b6; }
.sf-pill-closed { background: #dcfce7; color: #166534; }
.sf-pill-withdrawn { background: #f1f5f9; color: #475569; }
.sf-pill-draft { background: #fef3c7; color: #92400e; }
.sf-pill-published { background: #dcfce7; color: #166534; }
.sf-pill-retired { background: #f1f5f9; color: #475569; }
.sf-pill-off { background: #f1f5f9; color: #475569; }
.sf-table-list { width: 100%; border-collapse: collapse; font-size: 13px; }
.sf-table-list th { background: #f8fafc; padding: 11px 10px; text-align: left; font-size: 11px; font-weight: 900; color: #64748b; text-transform: uppercase; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.sf-table-list td { padding: 12px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.sf-tab { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cbd5e1; border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 800; color: #334155; background: #fff; text-decoration: none; }
.sf-tab-active { background: var(--theme-color-1, #1D3557); border-color: var(--theme-color-1, #1D3557); color: #fff; }
.sf-tab-count { border-radius: 999px; background: rgba(148, 163, 184, .25); padding: 0 7px; font-size: 11px; }
.sf-tab-active .sf-tab-count { background: rgba(255, 255, 255, .22); }
.sf-log { font-size: 12px; color: #334155; display: grid; gap: 8px; }
.sf-log-entry { border-left: 3px solid #cbd5e1; padding-left: 10px; }
.sf-callout { border-radius: 12px; padding: 10px 12px; font-size: 12.5px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.sf-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* "Please wait" overlay shown while a form is being saved (studentforms_form.js). */
.sf-loader { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55); }
.sf-loader[hidden] { display: none; }
.sf-loader-box { width: 100%; max-width: 380px; background: #fff; border-radius: 18px; padding: 26px 24px; text-align: center; box-shadow: 0 24px 60px rgba(15, 23, 42, .25); }
.sf-spinner { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%; border: 4px solid #e2e8f0; border-top-color: var(--theme-color-1, #1D3557); animation: sf-spin .8s linear infinite; }
.sf-loader-title { font-size: 16px; font-weight: 800; color: #0f172a; }
.sf-loader-text { margin-top: 6px; font-size: 13px; color: #475569; }
body.sf-loading { overflow: hidden; }
@keyframes sf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sf-spinner { animation-duration: 2.4s; } }
