/* GVP Alumni Directory */
.gvp-ad {
	--gvp-blue: #1b3a8a;
	--gvp-blue-soft: #eef2fb;
	--gvp-red: #c62828;
	--gvp-green: #1e7d34;
	--gvp-border: #d9dee8;
	--gvp-text: #1f2430;
	--gvp-muted: #6b7280;
	color: var(--gvp-text);
	font-size: 15px;
	line-height: 1.5;
	margin: 0 0 32px;
}
.gvp-ad *, .gvp-ad-dialog * { box-sizing: border-box; }
.gvp-ad.is-loading .gvp-ad-tablewrap { opacity: .5; transition: opacity .15s; }

.gvp-ad-banner {
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 14px;
	border-left: 4px solid var(--gvp-blue);
	background: var(--gvp-blue-soft);
}
.gvp-ad-banner.is-locked { border-left-color: var(--gvp-red); background: #fdeeee; }
.gvp-ad-count { display: block; margin-top: 4px; color: var(--gvp-green); font-weight: 600; }

.gvp-ad-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.gvp-ad-search {
	flex: 1 1 280px;
	min-width: 0;
	padding: 10px 12px !important;
	border: 1px solid var(--gvp-border) !important;
	border-radius: 6px !important;
	font-size: 15px !important;
	background: #fff !important;
	color: var(--gvp-text) !important;
	height: auto !important;
	margin: 0 !important;
}
.gvp-ad-filter, .gvp-ad-pager select {
	padding: 9px 10px;
	border: 1px solid var(--gvp-border);
	border-radius: 6px;
	background: #fff;
	color: var(--gvp-text);
	font-size: 14px;
	height: auto;
}
.gvp-ad-summary { color: var(--gvp-muted); font-size: 13px; margin: 4px 0 8px; min-height: 1.5em; }

.gvp-ad-btn {
	display: inline-block;
	padding: 9px 14px;
	border: 1px solid var(--gvp-border);
	border-radius: 6px;
	background: #fff;
	color: var(--gvp-blue);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
}
.gvp-ad-btn:hover:not([disabled]) { background: var(--gvp-blue-soft); }
.gvp-ad-btn[disabled] { opacity: .45; cursor: default; }
.gvp-ad-btn-primary { background: var(--gvp-blue); border-color: var(--gvp-blue); color: #fff; }
.gvp-ad-btn-primary:hover:not([disabled]) { background: #142c6b; color: #fff; }
.gvp-ad-btn-small { padding: 5px 10px; font-size: 13px; }
.gvp-ad-btn:focus-visible, .gvp-ad-search:focus-visible { outline: 2px solid var(--gvp-blue); outline-offset: 2px; }

.gvp-ad-tablewrap {
	border: 1px solid var(--gvp-border);
	border-radius: 8px;
	overflow: auto;
	max-height: 75vh;
	background: #fff;
}
.gvp-ad-table { width: 100%; border-collapse: collapse; margin: 0 !important; border: 0 !important; font-size: 14px; }
.gvp-ad-table th, .gvp-ad-table td {
	padding: 8px 10px !important;
	border: 0 !important;
	border-bottom: 1px solid #edf0f5 !important;
	text-align: left;
	vertical-align: top;
	color: var(--gvp-text);
}
.gvp-ad-table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	background: var(--gvp-blue) !important;
	color: #fff !important;
	font-weight: 600;
	font-size: 13px;
	white-space: nowrap;
}
.gvp-ad-table tbody tr:nth-child(even) td { background: #fafbfd; }
.gvp-ad-table tbody tr:hover td { background: #f1f5ff; }
.gvp-ad-table tr.is-added td.col-name::after { content: " (added)"; color: var(--gvp-green); font-size: 11px; font-weight: 600; }
.gvp-ad-table .col-sr_no { white-space: nowrap; color: var(--gvp-muted); }
.gvp-ad-table .col-name { font-weight: 600; min-width: 140px; }
.gvp-ad-table .col-father { min-width: 140px; }
.gvp-ad-table .col-address { min-width: 180px; }
.gvp-ad-table .col-achievement, .gvp-ad-table .col-other { min-width: 200px; }
.gvp-ad-table .col-email, .gvp-ad-table .col-social { word-break: break-all; min-width: 140px; }
.gvp-ad-table .col-act { white-space: nowrap; width: 1%; }
.gvp-ad-table a { color: var(--gvp-blue); }
.gvp-ad-empty { padding: 24px 16px; margin: 0; text-align: center; color: var(--gvp-muted); }

.gvp-ad-pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 12px; flex-wrap: wrap; }

.gvp-ad-dialog {
	position: fixed !important;
	inset: 0 !important;
	margin: auto !important;
	height: fit-content;
	overflow: auto;
	width: min(720px, calc(100vw - 24px));
	max-width: none;
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 0;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	color: #1f2430;
	background: #fff;
}
.gvp-ad-dialog::backdrop { background: rgba(10, 20, 40, .55); }
.gvp-ad-dialog form { padding: 20px; margin: 0; }
.gvp-ad-dialog h3 { margin: 0 0 4px; font-size: 20px; color: #1b3a8a; }
.gvp-ad-hint { margin: 0 0 14px; color: #6b7280; font-size: 13px; }
.gvp-ad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gvp-ad-field.is-wide { grid-column: 1 / -1; }
.gvp-ad-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 3px; color: #1f2430; }
.gvp-ad-field input, .gvp-ad-field textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #c9d0dc;
	border-radius: 6px;
	font-size: 15px;
	font-family: inherit;
	background: #fff;
	color: #1f2430;
	margin: 0;
}
.gvp-ad-field input:focus, .gvp-ad-field textarea:focus { outline: 2px solid #1b3a8a; outline-offset: 0; border-color: #1b3a8a; }
.gvp-ad-locked { padding: 8px 10px; background: #f3f4f6; border-radius: 6px; color: #374151; font-size: 15px; min-height: 38px; }
.gvp-ad-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gvp-ad-error { color: #c62828; font-weight: 600; margin: 10px 0 0; min-height: 1px; }
.gvp-ad-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.gvp-ad-spacer { flex: 1 1 auto; }
.gvp-ad-btn-danger { color: #c62828; border-color: #f0c4c4; }
.gvp-ad-btn-danger:hover:not([disabled]) { background: #fdeeee; }

.gvp-ad-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translate(-50%, 20px);
	background: #1e7d34;
	color: #fff;
	padding: 10px 18px;
	border-radius: 8px;
	font-weight: 600;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s, transform .2s;
	z-index: 100000;
	max-width: calc(100vw - 32px);
}
.gvp-ad-toast.show { opacity: 1; transform: translate(-50%, 0); }
.gvp-ad-toast.bad { background: #c62828; }

/* Phones: show each student as a card. */
@media (max-width: 720px) {
	.gvp-ad-tablewrap { max-height: none; border: 0; background: transparent; overflow: visible; }
	.gvp-ad-table, .gvp-ad-table tbody, .gvp-ad-table tr, .gvp-ad-table td { display: block; width: 100%; }
	.gvp-ad-table thead { display: none; }
	.gvp-ad-table tr {
		border: 1px solid var(--gvp-border);
		border-radius: 8px;
		margin-bottom: 10px;
		padding: 8px 4px;
		background: #fff;
	}
	.gvp-ad-table tbody tr:nth-child(even) td, .gvp-ad-table tbody tr:hover td { background: transparent; }
	.gvp-ad-table td { border: 0 !important; padding: 3px 10px !important; display: flex; gap: 8px; min-width: 0 !important; }
	.gvp-ad-table td::before { content: attr(data-label); flex: 0 0 40%; color: var(--gvp-muted); font-size: 12px; font-weight: 600; }
	.gvp-ad-table td.is-empty { display: none; }
	.gvp-ad-table td.col-name { font-size: 16px; }
	.gvp-ad-table tbody tr { display: flex; flex-direction: column; }
	.gvp-ad-table td.col-act { order: 99; width: 100%; padding-top: 8px !important; }
	.gvp-ad-table td.col-act .gvp-ad-btn { flex: 1 1 auto; padding: 8px 12px; font-size: 14px; }
	.gvp-ad-table td.col-act::before { content: none; }
	.gvp-ad-grid { grid-template-columns: 1fr; }
	.gvp-ad-toolbar .gvp-ad-btn-primary, .gvp-ad-filter { flex: 1 1 auto; }
}
