/* Public marksheet status page (/checkStatus) — same look as the form-opening-soon page */
:root {
	--brand: var(--sk-primary, #c0504d);
	--brand-dark: var(--sk-primary-dark, #8a3a37);
	--brand-rgb: var(--sk-primary-rgb, 192, 80, 77);
	--accent: var(--sk-accent, #e9b44c);
	--soft: var(--sk-primary-soft, #f9eeed);
	--ink: #1f2937;
	--muted: #6b7280;
	--line: #eceef3;
	--ok: #059669; --ok-soft: #d1fae5;
	--wait: #b45309; --wait-soft: #fef3c7;
	--bad: #b91c1c; --bad-soft: #fee2e2;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
	margin: 0; min-height: 100vh; display: flex; flex-direction: column;
	font: 15px/1.5 'Poppins', 'Noto Sans Gujarati', Arial, sans-serif; color: var(--ink);
	background:
		radial-gradient(circle at 12% 8%, rgba(245, 158, 11, .18), transparent 34%),
		radial-gradient(circle at 88% 60%, rgba(var(--brand-rgb), .10), transparent 40%),
		linear-gradient(135deg, #fffaf4 0%, var(--soft) 100%) fixed;
}
button, input, select { font: inherit; color: inherit; }

/* ---- top bar ---- */
.topbar {
	position: sticky; top: 0; z-index: 10;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 12px clamp(16px, 4vw, 48px);
	background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px); box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--brand-dark); font-weight: 700; font-size: 18px; }
.brand img { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn {
	display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px; border: 2px solid var(--brand);
	font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(var(--brand-rgb), .2); }
.btn-outline { background: #fff; color: var(--brand); }

/* ---- page ---- */
.wrap { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 28px) 24px; }

.hero {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	padding: 26px clamp(20px, 3vw, 32px); margin-bottom: 18px; border-radius: 24px; color: #fff;
	background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
	box-shadow: 0 20px 44px rgba(var(--brand-rgb), .22); position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.hero h1 { margin: 0; font: 700 clamp(24px, 4vw, 32px)/1.25 'Noto Sans Gujarati', 'Poppins', sans-serif; }
.hero p { margin: 6px 0 0; max-width: 620px; opacity: .92; font-size: 14.5px; }
.year-pick { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); }
.year-pick label { font-weight: 600; font-size: 14px; }
.year-pick select { border: 0; border-radius: 999px; padding: 7px 12px; background: #fff; color: var(--brand-dark); font-weight: 700; cursor: pointer; }
.year-tag { position: relative; z-index: 1; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-weight: 700; }

/* ---- status tiles (also filters) ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat {
	--c: var(--brand); --c-soft: var(--soft);
	display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left;
	padding: 14px 16px; border-radius: 18px; border: 2px solid transparent; background: #fff; cursor: pointer;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px rgba(16, 24, 40, .05); transition: border-color .15s, transform .15s;
}
.stat.approved { --c: var(--ok); --c-soft: var(--ok-soft); }
.stat.pending { --c: var(--wait); --c-soft: var(--wait-soft); }
.stat.rejected { --c: var(--bad); --c-soft: var(--bad-soft); }
.stat:hover:not(:disabled) { transform: translateY(-2px); }
.stat.active { border-color: var(--c); }
.stat:disabled { opacity: .55; cursor: default; }
.stat-ic { grid-row: span 2; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--c-soft); color: var(--c); font-size: 18px; font-weight: 700; }
.stat b { font-size: 24px; line-height: 1.1; color: var(--c); }
.stat small { font-size: 13px; color: var(--muted); font-family: 'Noto Sans Gujarati', 'Poppins', sans-serif; }

/* ---- search bar ---- */
.toolbar {
	position: sticky; top: 72px; z-index: 5;
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px; margin-bottom: 14px;
	border-radius: 18px; background: rgba(255, 255, 255, .96); box-shadow: 0 6px 18px rgba(16, 24, 40, .07);
}
.search { flex: 1 1 320px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid #d9dde5; border-radius: 12px; background: #fff; }
.search:focus-within, .toolbar select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .14); }
.search span { opacity: .55; }
.search input { flex: 1; min-width: 0; height: 44px; border: 0; outline: none; background: none; font-size: 15px; }
.toolbar select { flex: 0 1 220px; height: 46px; padding: 0 12px; border: 1px solid #d9dde5; border-radius: 12px; background: #fff; outline: none; cursor: pointer; }
.found { padding: 0 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---- rows ---- */
.list { display: flex; flex-direction: column; gap: 10px; }
.row {
	display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 2fr) minmax(150px, 1.1fr) 132px; gap: 8px 22px; align-items: center;
	padding: 16px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--wait);
	box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
	animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.row.st-approved { border-left-color: var(--ok); }
.row.st-rejected { border-left-color: var(--bad); }

.who { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.av { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; font-size: 17px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); }
.who-t { min-width: 0; }
.who-t > b { display: block; font-size: 15.5px; line-height: 1.3; text-transform: capitalize; }
.who-t > small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--muted); text-transform: capitalize; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.tags span { padding: 2px 9px; border-radius: 8px; background: #f3f4f6; font-size: 11.5px; color: var(--muted); }
.tags b { color: var(--ink); font-weight: 600; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.facts dt { font-size: 11.5px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.facts .mono { font-family: 'Poppins', monospace; letter-spacing: .3px; }

.score-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.score-top b { font-size: 19px; color: var(--ink); }
.score-top small { font-size: 11.5px; color: var(--muted); }
.bar { position: relative; height: 8px; margin-top: 7px; border-radius: 999px; background: #eef0f4; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #34d399, var(--ok)); }
.bar.low i { background: linear-gradient(90deg, #fbbf24, #d97706); }
.bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink); opacity: .55; }

.state { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.state small { font-size: 11px; color: var(--muted); letter-spacing: .3px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px; white-space: nowrap; font-family: 'Noto Sans Gujarati', 'Poppins', sans-serif; background: var(--wait-soft); color: var(--wait); }
.pill.approved { background: var(--ok-soft); color: var(--ok); }
.pill.rejected { background: var(--bad-soft); color: var(--bad); }

.reason { grid-column: 1 / -1; margin: 4px 0 0; padding: 10px 14px; border-radius: 12px; background: #fff5f5; border: 1px dashed #fecaca; color: #7f1d1d; font-size: 14px; font-family: 'Noto Sans Gujarati', 'Poppins', sans-serif; }
.reason b { color: var(--bad); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 46px 20px; border-radius: 20px; background: #fff; text-align: center; }
.empty > span { font-size: 38px; }
.empty b { font-size: 17px; }
.empty small { color: var(--muted); }
.empty .btn { margin-top: 8px; }

.note { margin: 18px 0 0; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .7); color: var(--muted); font-size: 13.5px; font-family: 'Noto Sans Gujarati', 'Poppins', sans-serif; }
footer { text-align: center; padding: 16px; font-size: 13px; color: var(--muted); }

/* ---- responsive ---- */
@media (max-width: 1000px) {
	.row { grid-template-columns: minmax(0, 1fr) auto; }
	.facts { grid-column: 1 / -1; grid-row: 2; }
	.score { grid-column: 1 / -1; grid-row: 3; }
	.state { grid-column: 2; grid-row: 1; align-self: start; }
}
@media (max-width: 640px) {
	.top-actions .btn span { display: none; }
	.top-actions .btn { padding: 8px 12px; }
	.brand { font-size: 15px; }
	.stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.toolbar { top: 66px; }
	.toolbar select { flex: 1 1 100%; }
	.row { padding: 14px; gap: 10px 12px; }
	.state small { display: none; }
	.pill { padding: 5px 10px; font-size: 12.5px; }
	.facts { padding: 10px 12px; border-radius: 12px; background: #f9fafb; }
}
