/* SSMT Online Application Portal — cetmat-style govt portal layout */
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', Arial, sans-serif; background: #eef1fb; color: #21313c; font-size: 15px; }
a { color: #041c89; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 14px; }

/* top strip */
.topstrip { background: #03156a; color: #dce9f0; font-size: 12.5px; }
.topstrip-in { display: flex; justify-content: space-between; flex-wrap: wrap; padding: 5px 14px; gap: 6px; }

/* masthead */
.masthead { background: #fff; border-bottom: 4px solid #b3631a; }
.masthead-in { display: flex; align-items: center; gap: 18px; padding: 14px; }
.masthead .logo { height: 84px; width: auto; }
.masthead-text { flex: 1; text-align: center; }
.masthead-text h1 { margin: 0; font-size: 26px; color: #041c89; letter-spacing: .5px; }
.masthead-text .aff { font-size: 13px; color: #555; margin: 2px 0; }
.masthead-text h2 { margin: 4px 0 0; font-size: 16px; color: #b3631a; letter-spacing: 1px; }
.logo-right .seal { font-size: 11px; text-align: center; border: 2px solid #041c89; border-radius: 50%; padding: 14px 10px; color: #041c89; line-height: 1.5; }

/* nav */
.mainnav { background: #041c89; }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.mainnav a { display: block; color: #fff; text-decoration: none; padding: 11px 15px; font-size: 14px; }
.mainnav a:hover, .mainnav a.active { background: #b3631a; }
.mainnav .nav-logout { background: #7c2d12; }
.navbtn { display: none; color: #fff; padding: 10px 15px; cursor: pointer; }

/* main + cards */
.main { padding: 22px 14px 40px; min-height: 55vh; }
.card { background: #fff; border: 1px solid #d5dee5; border-top: 3px solid #041c89; border-radius: 5px; padding: 18px 22px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(10,79,110,.07); }
.card-h { margin: 0 0 12px; color: #041c89; font-size: 18px; border-bottom: 1px solid #e3eaef; padding-bottom: 8px; }
.card.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.grid2 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.loginbox { border-top-color: #b3631a; }

/* forms */
label { display: block; margin: 0 0 13px; font-weight: 600; font-size: 14px; }
label.inline { display: inline-block; margin: 4px 16px 4px 0; font-weight: 500; }
label.inline.block { display: block; }
input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=password], input[type=search], select, textarea {
	display: block; width: 100%; margin-top: 4px; padding: 9px 10px;
	border: 1px solid #b6c4ce; border-radius: 4px; font-size: 15px; background: #fbfdfe;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #041c89; outline-offset: 1px; }
input.ro { background: #eef2f4; color: #445; }
small { font-weight: 400; color: #67757e; display: block; margin-top: 3px; }
small.ok, .ok { color: #14733c; font-weight: 600; }
.bad { color: #a01c1c; font-weight: 600; }
.req { color: #c0392b; }
.lbl { display: block; font-weight: 600; margin-bottom: 4px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 20px; }
.captcha-row { display: flex; align-items: center; gap: 12px; margin: 6px 0; flex-wrap: wrap; }
.captcha-row img { border: 1px solid #b6c4ce; border-radius: 4px; width: 220px; height: 64px; }

/* ---------- Modal popup (সব message-এর জন্য) ---------- */
body.ssmt-modal-open { overflow: hidden; }
.ssmt-modal-overlay { position: fixed; inset: 0; background: rgba(8, 33, 46, .62); z-index: 9999;
	display: flex; align-items: center; justify-content: center; padding: 18px; animation: ssmtFade .18s ease; }
.ssmt-modal { background: #fff; border-radius: 8px; max-width: 480px; width: 100%; padding: 26px 26px 22px;
	text-align: center; box-shadow: 0 18px 50px rgba(0, 0, 0, .3); animation: ssmtPop .2s ease; }
.ssmt-modal-icon { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; color: #fff; }
.ssmt-modal-icon.ok   { background: #1d7d4b; }
.ssmt-modal-icon.err  { background: #b02a2a; }
.ssmt-modal-icon.ask  { background: #b3631a; }
.ssmt-modal-icon.info { background: #041c89; font-style: italic; font-family: Georgia, serif; }
.ssmt-modal-title { margin: 0 0 8px; color: #041c89; font-size: 19px; }
.ssmt-modal-body { font-size: 15px; line-height: 1.55; color: #35434d; word-break: break-word; }
.ssmt-modal-btns { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@keyframes ssmtFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ssmtPop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Upload Documents — card grid + live preview ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 16px; }
.doc-card { border: 1px solid #d5dee5; border-radius: 6px; background: #fbfdfe; padding: 12px;
	display: flex; flex-direction: column; gap: 8px; }
.doc-card.ps { border-color: #b3631a55; background: #fffaf3; }
.doc-card .doc-title { font-weight: 700; font-size: 13.5px; color: #21313c; min-height: 34px; }
.doc-card .doc-hint { font-weight: 400; font-size: 11.5px; color: #67757e; margin: 0; }
.doc-preview { height: 150px; border: 1px dashed #b6c4ce; border-radius: 5px; background: #fff;
	display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.doc-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.doc-preview .doc-empty { color: #9aa8b1; font-size: 12.5px; text-align: center; padding: 8px; }
.doc-preview .doc-pdf { text-align: center; color: #a01c1c; font-weight: 700; font-size: 13px; }
.doc-preview .doc-pdf span { display: block; font-size: 34px; }
.doc-card input[type=file] { font-size: 12.5px; width: 100%; }
.doc-status { font-size: 12px; }
.doc-status.new { color: #b3631a; font-weight: 700; }

/* ---------- QR Payment ---------- */
.qr-pay { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
.qr-pay .qr-img { width: 100%; max-width: 260px; border: 2px solid #041c89; border-radius: 8px; background: #fff; }
.qr-steps { margin: 0 0 12px; padding-left: 20px; }
.qr-steps li { margin-bottom: 8px; font-size: 14.5px; }
.upi-id { display: inline-block; background: #eef1fb; border: 1px dashed #041c89; border-radius: 5px;
	padding: 6px 14px; font-weight: 700; font-size: 16px; letter-spacing: .5px; color: #041c89; }
.btn-wa { background: #1da851 !important; display: inline-flex; align-items: center; gap: 8px; }
.btn-wa:hover { background: #168f43 !important; }
.pill-pending { background: #8a6d00; border-color: #8a6d00; }
.paybox.pending { border-top-color: #8a6d00; }
@media (max-width: 640px) { .qr-pay { grid-template-columns: 1fr; } .qr-pay .qr-img { margin: 0 auto; } }

/* buttons */
.btn { display: inline-block; background: #041c89; color: #fff !important; border: 0; border-radius: 4px;
	padding: 11px 24px; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: #03156a; }
.btn-alt { background: #5c6b74; }
.btn-alt:hover { background: #49555d; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.linkbtn { background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit; text-decoration: underline; }
.mt { margin-top: 12px; }

/* notices */
.notice { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; }
.notice-success { background: #e6f6ec; border: 1px solid #9bd7b1; color: #14572f; }
.notice-error { background: #fdecec; border: 1px solid #eba7a7; color: #8c1c1c; }

/* tables */
.tablewrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border: 1px solid #d3dde4; padding: 8px 10px; text-align: left; font-size: 14px; }
.table th { background: #eef1fb; color: #041c89; }
.table.acad input { min-width: 70px; }
.table.kv th { width: 220px; }
.actions a, .actions form { margin-right: 6px; }
.steps li { margin-bottom: 10px; }

/* topbar (candidate) */
.topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
	background: #041c89; color: #fff; border-radius: 5px; padding: 14px 20px; margin-bottom: 18px; }
.appno { font-size: 1.3em; letter-spacing: 3px; }
.pill { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: .82em; margin-left: 5px;
	background: #ffffff26; border: 1px solid #ffffff55; }
.pill-paid, .pill-submitted { background: #1d7d4b; border-color: #1d7d4b; }
.pill-unpaid, .pill-registered, .pill-draft { background: #b3631a; border-color: #b3631a; }
.paybox { border-top-color: #b3631a; }
.paybox.done { border-top-color: #1d7d4b; }

/* footer */
.sitefooter { background: #03156a; color: #cfdde6; margin-top: 20px; }
.sitefooter a { color: #ffd9a0; }
.footgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 26px 14px; font-size: 13.5px; }
.sitefooter h4 { color: #fff; margin: 0 0 8px; }
.footbar { text-align: center; background: #03156a; padding: 10px; font-size: 12.5px; }

/* admin */
.adminbody { background: #eef1fb; }
.adminbar { background: #21313c; color: #fff; }
.adminbar-in { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
.adminbar a { color: #ffd9a0; }

/* ---------- Admin sidebar layout ---------- */
.admin-layout { max-width: 1320px; margin: 0 auto; padding: 18px 14px 40px;
	display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 18px; align-items: start; }
.admin-side { background: #020f4d; border-radius: 6px; overflow: hidden; position: sticky; top: 14px;
	box-shadow: 0 1px 3px rgba(10,79,110,.15); }
.admin-side .side-head { background: #020f4d; color: #ffd9a0; font-weight: 700; font-size: 15px;
	padding: 14px 16px; letter-spacing: .5px; }
.admin-side nav { display: flex; flex-direction: column; padding: 8px 0 12px; }
.admin-side nav a { display: flex; align-items: center; gap: 10px; color: #cfdde6; text-decoration: none;
	padding: 10px 16px; font-size: 14px; border-left: 4px solid transparent; }
.admin-side nav a.sub { padding-left: 30px; font-size: 13.5px; }
.admin-side nav a:hover { background: #03156a; color: #fff; }
.admin-side nav a.active { background: #b3631a; color: #fff; border-left-color: #ffd9a0; font-weight: 700; }
.admin-side nav a.side-logout { color: #ffb4a8; }
.admin-side .side-sep { border-top: 1px solid #ffffff1f; margin: 8px 12px; }
.side-badge { margin-left: auto; background: #b3631a; color: #fff; border-radius: 999px;
	font-size: 11.5px; font-weight: 700; padding: 1px 8px; }
.admin-content { min-width: 0; }
@media (max-width: 860px) {
	.admin-layout { grid-template-columns: 1fr; }
	.admin-side { position: static; }
	.admin-side nav { flex-direction: row; flex-wrap: wrap; padding: 6px; }
	.admin-side nav a { border-left: 0; border-radius: 4px; padding: 8px 10px; }
	.admin-side nav a.sub { padding-left: 10px; }
	.admin-side .side-sep { display: none; }
}

/* ---------- Pagination ---------- */
.pagerow { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pageinfo { font-size: 13px; color: #67757e; }
.pager { display: flex; gap: 5px; flex-wrap: wrap; }
.pager a, .pager span.cur, .pager span.gap { display: inline-block; min-width: 34px; text-align: center;
	padding: 7px 10px; border: 1px solid #b6c4ce; border-radius: 4px; font-size: 13.5px;
	text-decoration: none; background: #fff; color: #041c89; }
.pager a:hover { background: #eef1fb; }
.pager span.cur { background: #041c89; border-color: #041c89; color: #fff; font-weight: 700; }
.pager span.gap { border: 0; background: none; color: #67757e; }
.pager a.dis { pointer-events: none; opacity: .45; }
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.admin-login-wrap .card { width: 100%; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid #d5dee5; border-radius: 5px; padding: 14px; text-align: center; }
.stat b { display: block; font-size: 24px; color: #041c89; }
.stat span { font-size: 12.5px; color: #67757e; }
.filterrow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filterrow input, .filterrow select { width: auto; flex: 1; min-width: 140px; margin: 0; }

/* responsive */
@media (max-width: 760px) {
	.grid2, .fgrid, .footgrid { grid-template-columns: 1fr; }
	.masthead-in { flex-direction: column; gap: 8px; }
	.masthead-text h1 { font-size: 20px; }
	.logo-right { display: none; }
	.navbtn { display: block; }
	.mainnav ul { display: none; flex-direction: column; }
	#navtoggle:checked ~ ul { display: flex; }
}

/* ---- Course dropdown + same-address checkbox (UI update) ---- */
select optgroup { font-weight: 700; color: #041c89; }
select option { font-weight: 400; color: #21313c; padding: 4px; }
.chk-same { display: block; margin: 6px 0 12px; padding: 10px 12px; background: #eef1fb;
	border: 1px solid #cfd8f0; border-radius: 6px; cursor: pointer; }
.chk-same input { margin-right: 8px; transform: scale(1.15); vertical-align: middle; }
#corr_wrap { border-left: 3px solid #cfd8f0; padding-left: 14px; margin-top: 4px; }
