
:root {
  --nd-primary:var(--accent);
  --nd-accent:var(--gold);
  --nd-ink: #16211f;
  --nd-muted: #63716d;
  --nd-paper: #fbf8f1;
  --nd-surface: #ffffff;
  --nd-line: #e7dfd1;
  --nd-soft:var(--tint);
  --nd-shadow: 0 18px 46px rgba(22, 33, 31, 0.12);
  --nd-container-max: 1180px;
  --nd-gutter: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.nisfuddeen-theme {
  margin: 0;
  color: var(--nd-ink);
  font-family: var(--nd-ff,"Hind Siliguri", "Nirmala UI", "Segoe UI", Arial, sans-serif);
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.nd-container { width: min(var(--nd-container-max), calc(100% - var(--nd-gutter) * 2)); margin-inline: auto; }
.nd-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 850;
}
.nd-button-primary { background: var(--nd-primary); color: #fff; box-shadow: 0 12px 26px color-mix(in srgb,var(--accent) 22%,transparent); }
.nd-button-soft { background: var(--nd-soft); color: var(--nd-primary); border-color: var(--line); }
.nd-button-outline { color: #fff; border-color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.08); }

/* বায়োডাটা আর্কাইভ হেডার (ফিল্টার বাটন যেখানে থাকে) */
main.nd-container { padding-block: 32px; }
.nd-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.nd-results-header h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.nd-filter-button { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.nd-results-count { margin: 0 0 24px; color: var(--nd-muted); font-weight: 700; }

.nd-filter-overlay {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: rgba(15, 39, 37, 0.42);
	backdrop-filter: blur(2px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .22s ease;
}
.nd-filter-overlay.is-open { opacity: 1; pointer-events: auto; }

.nd-filter-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 91;
	width: min(440px, 100%);
	background: var(--nd-surface);
	box-shadow: -20px 0 50px rgba(22, 33, 31, 0.22);
	transform: translateX(100%);
	transition: transform .28s ease;
	display: flex;
	flex-direction: column;
}
.nd-filter-drawer.is-open { transform: translateX(0); }

.nd-filter-form { display: flex; flex-direction: column; min-height: 100%; }

.nd-filter-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 22px;
	border-bottom: 1px solid var(--nd-line);
	background: var(--nd-paper);
}
.nd-filter-drawer-head h2 { margin: 0; font-size: 1.2rem; }
.nd-filter-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 8px;
	border: 1px solid var(--nd-line);
	background: #fff;
	color: var(--nd-ink);
	cursor: pointer;
	flex: 0 0 auto;
}
.nd-filter-icon-btn:hover { background: var(--nd-soft); color: var(--nd-primary); border-color: var(--line); }

.nd-filter-drawer-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 20px 22px 8px;
	display: grid;
	gap: 22px;
}

.nd-filter-section {
	padding: 16px 16px 18px;
	border: 1px solid var(--nd-line);
	border-radius: 10px;
	background: var(--nd-paper);
}
.nd-filter-section-title {
	margin: 0 0 14px;
	font-size: .82rem;
	font-weight: 900;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--nd-primary);
}

.nd-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nd-filter-grid-1 { grid-template-columns: 1fr; }
.nd-filter-grid .nd-field-full { grid-column: 1 / -1; }

.nd-field { display: grid; gap: 6px; }
.nd-field > span:first-child { font-weight: 800; font-size: .88rem; color: #33433f; }
.nd-field select {
	width: 100%;
	min-height: 44px;
	border: 1px solid var(--nd-line);
	border-radius: 8px;
	background: #fff;
	padding: 0 12px;
	color: var(--nd-ink);
}
.nd-field select:invalid,
.nd-field select option[value=""] { color: var(--nd-muted); }

/* Single address selector (collapses country → division → district →
   upazila → thana → union into one control) */
.nd-address-selector { position: relative; }
.nd-address-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	border: 1px solid var(--nd-line);
	border-radius: 8px;
	background: #fff;
	padding: 0 12px;
	cursor: pointer;
	color: var(--nd-ink);
	text-align: left;
}
.nd-address-trigger:hover { border-color: var(--line); }
.nd-address-trigger svg:first-child { flex: 0 0 auto; color: var(--nd-primary); }
.nd-address-trigger-text { flex: 1 1 auto; color: var(--nd-muted); font-weight: 700; }
.nd-address-chevron { flex: 0 0 auto; color: var(--nd-muted); transition: transform .15s ease; }
.nd-address-selector.is-open .nd-address-chevron { transform: rotate(180deg); }

.nd-address-panel {
	position: absolute;
	z-index: 5;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	padding: 14px;
	border: 1px solid var(--nd-line);
	border-radius: 10px;
	background: #fff;
	box-shadow: var(--nd-shadow);
}
.nd-address-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.nd-address-level {
	min-height: 42px;
	border: 1px solid var(--nd-line);
	border-radius: 8px;
	background: #fff;
	padding: 0 10px;
	color: var(--nd-ink);
}
.nd-address-level:disabled { background: var(--nd-soft); color: var(--nd-muted); cursor: not-allowed; }
.nd-address-done { width: 100%; min-height: 40px; }

/* Multi select dropdown (study medium, religious qualification, profession) */
.nd-multiselect { position: relative; }
.nd-multiselect-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	border: 1px solid var(--nd-line);
	border-radius: 8px;
	background: #fff;
	padding: 0 12px;
	cursor: pointer;
	text-align: left;
}
.nd-multiselect-trigger:hover { border-color: var(--line); }
.nd-multiselect-trigger-text { flex: 1 1 auto; color: var(--nd-muted); font-weight: 700; }
.nd-multiselect-count {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--nd-soft);
	color: var(--nd-primary);
	font-size: .76rem;
	font-weight: 900;
}
.nd-multiselect-chevron { flex: 0 0 auto; color: var(--nd-muted); transition: transform .15s ease; }
.nd-multiselect.is-open .nd-multiselect-chevron { transform: rotate(180deg); }

.nd-multiselect-panel {
	position: absolute;
	z-index: 5;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	max-height: 220px;
	overflow-y: auto;
	border: 1px solid var(--nd-line);
	border-radius: 10px;
	background: #fff;
	box-shadow: var(--nd-shadow);
}
.nd-multiselect-options { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; min-height: 44px; }
.nd-multiselect-options label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
}
.nd-multiselect-options label:hover { background: var(--nd-soft); }
.nd-multiselect-options:empty::before {
	content: "অপশনসমূহ শীঘ্রই যুক্ত হবে";
	display: block;
	padding: 14px 10px;
	color: var(--nd-muted);
	font-size: .86rem;
	font-weight: 600;
}

.nd-filter-drawer-foot {
	display: flex;
	gap: 10px;
	padding: 16px 22px;
	border-top: 1px solid var(--nd-line);
	background: var(--nd-surface);
}
.nd-filter-drawer-foot .nd-button { flex: 1 1 0; }

@media (max-width: 640px) {
	.nd-filter-drawer { width: 100%; }
	.nd-filter-grid, .nd-address-levels { grid-template-columns: 1fr; }
	
}

.nd-range { display: grid; gap: 10px; }
.nd-range-value { font-weight: 800; font-size: .92rem; color: var(--nd-primary); }
.nd-range-track { position: relative; height: 28px; }
.nd-range-track::before {
	content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 6px;
	transform: translateY(-50%); border-radius: 999px; background: var(--nd-line);
}
.nd-range-fill {
	position: absolute; top: 50%; height: 6px; transform: translateY(-50%);
	border-radius: 999px; background: var(--nd-primary); pointer-events: none;
}
.nd-range-track input[type="range"] {
	position: absolute; left: 0; top: 0; width: 100%; height: 28px; margin: 0;
	background: transparent; pointer-events: none;
	-webkit-appearance: none; appearance: none; z-index: 3;
}
.nd-range-track input[type="range"]::-webkit-slider-runnable-track { background: transparent; height: 28px; }
.nd-range-track input[type="range"]::-moz-range-track { background: transparent; height: 28px; }
.nd-range-track input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none; pointer-events: auto;
	width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; cursor: pointer;
	background: #fff; border: 2px solid var(--nd-primary); box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.nd-range-track input[type="range"]::-moz-range-thumb {
	pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; cursor: pointer;
	background: #fff; border: 2px solid var(--nd-primary); box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.nd-range-track input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--nd-primary); outline-offset: 2px; }
.nd-range-track input[type="range"] { touch-action: none; }
