/* School Management System — Public / Portal Styles */
.sms-box {
	max-width: 760px;
	margin: 30px auto;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 30px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.sms-box h2 { margin-top: 0; color: var(--sms-primary, #1d4ed8); }
.sms-box h3 { color: var(--sms-primary, #1d4ed8); border-bottom: 2px solid var(--sms-secondary, #f59e0b); padding-bottom: 6px; }
.sms-box label { font-weight: 600; display: block; margin-bottom: 4px; }
.sms-box input[type=text], .sms-box input[type=email], .sms-box input[type=password], .sms-box input[type=date], .sms-box select, .sms-box textarea {
	width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; margin-bottom: 4px; box-sizing: border-box;
}
.sms-btn, .sms-box button[type=submit] {
	background: var(--sms-primary, #1d4ed8); color: #fff; border: none; padding: 10px 20px;
	border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.sms-btn:hover, .sms-box button[type=submit]:hover { opacity: 0.9; }
.sms-btn-secondary {
	background: #fff; color: var(--sms-primary, #1d4ed8); border: 1px solid var(--sms-primary, #1d4ed8);
	padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-block;
}
.sms-notice { padding: 10px 14px; border-radius: 6px; margin-bottom: 15px; }
.sms-notice-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.sms-notice-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.sms-notice-info { background: #dbeafe; color: #1e3a8a; border: 1px solid #bfdbfe; }
.sms-report-photo { width: 90px; height: 108px; object-fit: cover; border: 1px solid #cbd5e1; border-radius: 4px; margin-left: auto; flex-shrink: 0; }
.sms-report-photo-placeholder { background: #f1f5f9; }
.sms-report-header .sms-report-school-info { flex: 1; }

.sms-tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid #e2e8f0; }
.sms-tabs a { padding: 8px 16px; text-decoration: none; color: #64748b; border-bottom: 3px solid transparent; font-weight: 600; }
.sms-tabs a.active { color: var(--sms-primary, #1d4ed8); border-bottom-color: var(--sms-secondary, #f59e0b); }

.sms-child-row { display: flex; gap: 10px; margin-bottom: 10px; }
.sms-child-row input { flex: 1; }

/* Honeypot spam-trap field (1.1.0): positioned off-screen rather than
   display:none, since some bots specifically skip hidden/display:none
   fields. Real visitors never see or reach it. */
.sms-hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

.sms-portal { max-width: 1000px; }
.sms-portal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.sms-profile-summary { background: #f8fafc; padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; }
.sms-inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 15px; }
.sms-inline-form select, .sms-inline-form input[type=text] { padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 6px; }
.sms-alloc-links { list-style: none; padding: 0; }
.sms-alloc-links li { margin-bottom: 6px; }
.sms-alloc-links a { text-decoration: none; color: var(--sms-primary, #1d4ed8); font-weight: 600; }
.sms-adm { color: #94a3b8; font-size: 0.85em; }

table.widefat, .sms-portal table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; }
.sms-portal table th, .sms-portal table td { border: 1px solid #e2e8f0; padding: 8px 10px; text-align: left; }
.sms-portal table th { background: #f1f5f9; }
.sms-portal table input[type=number] { width: 70px; padding: 4px; }

/* --- Report Card --- */
.sms-report-card { background: #fff; padding: 30px; border: 2px solid var(--sms-primary, #1d4ed8); border-radius: 8px; margin-top: 20px; }
.sms-report-header { display: flex; align-items: flex-start; gap: 16px; border-bottom: 3px solid var(--sms-secondary, #f59e0b); padding-bottom: 15px; margin-bottom: 15px; }
.sms-report-logo { max-height: 80px; }
.sms-report-school-info h1 { margin: 0; font-size: 22px; color: var(--sms-primary, #1d4ed8); }
.sms-report-school-info p { margin: 2px 0; font-size: 13px; color: #475569; }
.sms-report-title { text-align: center; text-transform: uppercase; letter-spacing: 1px; color: var(--sms-primary, #1d4ed8); }
.sms-report-meta-table, .sms-report-results-table, .sms-report-summary-table { width: 100%; border-collapse: collapse; margin-bottom: 15px; }
.sms-report-meta-table td { padding: 6px 4px; }
.sms-report-results-table th, .sms-report-results-table td { border: 1px solid #cbd5e1; padding: 8px; text-align: center; }
.sms-report-results-table th { background: var(--sms-primary, #1d4ed8); color: #fff; }
.sms-report-results-table td:first-child { text-align: left; }
.sms-report-summary-table td { background: #f8fafc; padding: 10px; font-weight: 600; border: 1px solid #e2e8f0; }
.sms-report-comments p { margin: 6px 0; }
.sms-grading-legend { font-size: 12px; color: #475569; background: #f8fafc; padding: 8px; border-radius: 6px; margin: 15px 0; }
.sms-report-signature { display: flex; justify-content: space-between; margin-top: 40px; }
.sms-sig-box { border-top: 1px solid #334155; width: 40%; text-align: center; padding-top: 6px; font-size: 13px; }
.sms-report-actions { text-align: right; margin-bottom: 10px; }
.sms-report-actions button { background: var(--sms-secondary, #f59e0b); border: none; color: #fff; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; }

@media print {
	.no-print, .sms-report-actions { display: none !important; }
	.sms-box { box-shadow: none; border: none; }
	body * { visibility: hidden; }
	.sms-report-card, .sms-report-card * { visibility: visible; }
	.sms-report-card { position: absolute; left: 0; top: 0; width: 100%; }
}
