:root {
	--admin-surface: rgba(255, 255, 255, 0.96);
	--admin-border: rgba(45, 48, 143, 0.16);
	--admin-soft: rgba(207, 209, 255, 0.18);
	--admin-muted: rgba(45, 48, 143, 0.55);
}

body {
	background: var(--bg-content);
	color: var(--navy);
}

.admin-members-page {
	background: var(--bg-content);
}

.admin-shell {
	max-width: 1480px;
	margin: 0 auto;
	padding: 28px 18px 48px;
}

.admin-header {
	margin-bottom: 24px;
}

.admin-page-title {
	margin: 0;
	color: var(--primary);
	font-size: clamp(2rem, 2vw, 2.7rem);
	font-weight: 700;
	line-height: 1.2;
}

.admin-page-subtitle {
	margin: 8px 0 0;
	color: rgba(45, 48, 143, 0.62);
	font-size: 0.96rem;
	font-weight: 400;
}

.admin-toolbar {
	background: var(--admin-surface);
	border: 1px solid var(--admin-border);
	border-radius: 18px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
	padding: 18px 18px 16px;
	margin-bottom: 26px;
}

.admin-tool-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.admin-search {
	flex: 1 1 335px;
	/* max-width: 420px; */
	min-width: 240px;
	margin-inline-start: auto;
}

.admin-search .form-control {
	width: 100%;
	height: 46px;
	border: 1px solid rgba(45, 48, 143, 0.2);
	border-radius: 12px;
	background: #fff;
	color: var(--navy);
	font-size: 0.96rem;
	padding: 0 16px 0 42px;
	text-align: right;
	box-shadow: none;
}

.admin-search .form-control:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 0.2rem rgba(61, 66, 200, 0.12);
}

.admin-search .form-control::placeholder {
	color: rgba(45, 48, 143, 0.5);
}

.search-icon-wrap {
	position: relative;
	width: 100%;
}

/* Search button sits inside the input area without altering the layout or adding default browser button styling. */
.search-trigger-btn {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	padding: 0;
	margin: 0;
	cursor: pointer;
	z-index: 2;
}

.search-trigger-btn i {
	font-size: 1rem;
	color: var(--primary);
	pointer-events: none;
}

.search-trigger-btn:focus,
.search-trigger-btn:hover {
	outline: none;
	background: transparent;
}

.search-icon-wrap i {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1rem;
	color: var(--primary);
	pointer-events: none;
}

.admin-filter {
	flex: 1 1 175px;
	min-width: 170px;
}

.admin-filter .form-select {
	width: 100%;
	height: 46px;
	border: 1px solid rgba(45, 48, 143, 0.2);
	border-radius: 12px;
	background: #fff;
	color: var(--navy);
	font-size: 0.92rem;
	padding: 0 14px 0 38px;
	text-align: right;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	box-shadow: none;
}

.admin-filter .form-select:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 0.2rem rgba(61, 66, 200, 0.12);
}

.admin-filter-wrap {
	position: relative;
}

.admin-filter-wrap i {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--primary);
	font-size: 0.9rem;
	pointer-events: none;
}

.btn-admin-primary {
	height: 46px;
	border: none;
	background: var(--primary);
	color: #fff;
	border-radius: 12px;
	padding: 0 18px;
	font-weight: 600;
	font-size: 0.94rem;
	white-space: nowrap;
	box-shadow: none;
	transition: background-color 0.15s ease;
}

.btn-admin-primary:hover,
.btn-admin-primary:focus {
	background: #1d216d;
	color: #fff;
}

.btn-admin-primary i {
	font-size: 1rem;
	vertical-align: middle;
}

.btn-admin-filter {
	height: 46px;
	border: 1px solid rgba(45, 48, 143, 0.2);
	background: #fff;
	color: var(--primary);
	border-radius: 12px;
	padding: 0 18px;
	font-weight: 600;
	font-size: 0.92rem;
	white-space: nowrap;
	box-shadow: none;
	transition: all 0.15s ease;
}

.btn-admin-filter:hover,
.btn-admin-filter:focus {
	background: #f4f4ff;
	border-color: rgba(45, 48, 143, 0.3);
	color: var(--primary);
}

.admin-table-card {
	background: var(--admin-surface);
	border: 1px solid var(--admin-border);
	border-radius: 18px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.admin-table-header {
	padding: 18px 20px 14px;
	border-bottom: 1px solid rgba(45, 48, 143, 0.08);
	background: rgba(255, 255, 255, 0.78);
}

.admin-section-title {
	margin: 0;
	color: var(--primary);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.3;
}

.admin-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.admin-table {
	width: 100%;
	min-width: 1100px;
	margin: 0;
	border-collapse: collapse;
	background: #fff;
}

.admin-table thead th {
	background: rgba(207, 209, 255, 0.18);
	color: var(--navy);
	font-size: 0.9rem;
	font-weight: 700;
	padding: 14px 12px;
	text-align: center;
	border-bottom: 1px solid rgba(45, 48, 143, 0.08);
	white-space: nowrap;
}

.admin-table tbody td {
	padding: 14px 12px;
	font-size: 0.92rem;
	color: var(--navy);
	text-align: center;
	border-bottom: 1px solid rgba(45, 48, 143, 0.08);
	vertical-align: middle;
	background: #fff;
	white-space: nowrap;
}

.admin-table tbody tr:hover td {
	background: rgba(207, 209, 255, 0.08);
}

.member-name {
	font-weight: 600;
	color: var(--primary);
}

.member-email {
	direction: ltr;
	font-weight: 500;
	color: var(--navy);
}

.member-date {
	color: rgba(45, 48, 143, 0.72);
}

.admin-actions {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
}

.admin-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border-radius: 8px;
	min-height: 32px;
	padding: 6px 10px;
	font-size: 0.76rem;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	width: 100%;
	max-width: 300px;
	transition: all 0.15s ease;
}

.admin-action.view {
	color: var(--primary);
	background: rgba(207, 209, 255, 0.12);
	border: 1px solid rgba(45, 48, 143, 0.25);
}

.admin-action.view:hover,
.admin-action.view:focus {
	background: rgba(207, 209, 255, 0.2);
	color: var(--primary);
}

.admin-action.reset {
	color: #fff;
	background: var(--primary);
	border: 1px solid rgba(45, 48, 143, 0.22);
}

.admin-action.reset:hover,
.admin-action.reset:focus {
	background: #1d216d;
	color: #fff;
}

/* Empty-state row used when the member list is filtered to zero results. */
.admin-empty-row {
	display: none;
	text-align: center;
	color: var(--navy);
	font-weight: 500;
	padding: 24px 12px;
	background: #fff;
}

/* =========================================================
   Admin password-toggle field styling.
   These styles mirror the login page eye-toggle pattern so the
   fields behave the same way visually and functionally.
   ========================================================= */
.admin-password-wrap {
	position: relative;
	width: 100%;
}

.admin-password-wrap .form-input {
	padding-left: 42px;
	padding-right: 12px;
}

.admin-password-wrap .settings-input {
	padding-left: 42px;
	padding-right: 12px;
}

.admin-password-toggle-btn {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	z-index: 2;
}

.admin-password-toggle-btn .login-card-eye-icon {
	width: 18px;
	height: 18px;
	background-color: #3d42c8;
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	-webkit-mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-image: url('../assets/icons/eye.png');
	-webkit-mask-image: url('../assets/icons/eye.png');
}

.admin-password-toggle-btn .login-card-eye-icon.invis {
	mask-image: url('../assets/icons/eye-invis.png');
	-webkit-mask-image: url('../assets/icons/eye-invis.png');
}

/* =========================================================
   Modal styles for the Create Account and Reset Password dialogs.
   These follow the same patterns already used by the project’s
   other modal forms: overlay, card, close button, title, subtitle,
   input layout, and action row.
   ========================================================= */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.modal-card {
	position: relative;
	background-color: #f9f8f3;
	border-radius: 16px;
	width: 90%;
	max-width: 620px;
	padding: 32px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	transform: scale(0.85);
	transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
	transform: scale(1);
}

.close-btn {
	position: absolute;
	top: 18px;
	left: 20px;
	background: none;
	border: none;
	font-size: 24px;
	color: #555;
	cursor: pointer;
}

.modal-title {
	font-size: 20px;
	font-weight: 700;
	color: #120e43;
	margin: 0 0 4px 0;
	text-align: right;
}

.modal-subtitle {
	font-size: 13px;
	color: #777;
	margin: 0 0 24px 0;
	text-align: right;
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.form-grid.single-column {
	grid-template-columns: 1fr;
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-group-full {
	grid-column: 1 / -1;
}

.form-label {
	font-size: 13px;
	font-weight: 600;
	color: #2b2b2b;
	margin-bottom: 6px;
	text-align: right;
}

.required {
	color: #d9534f;
}

.form-input {
	width: 100%;
	height: 42px;
	border: 1px solid #d3d3d3;
	border-radius: 10px;
	padding: 0 14px;
	font-size: 14px;
	background: #ffffff;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
	border-color: #3d42c8;
	box-shadow: 0 0 0 3px rgba(61, 66, 200, 0.15);
}

/* Dynamic Department Rows Styles */
.dept-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dept-input {
  flex-grow: 1;
}

.dept-delete-btn {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.dept-delete-btn:hover {
  background-color: #dc3545;
  color: #fff;
}

.dept-list-item {
  background: #f4f4ff;
  border: 1px solid rgba(45, 48, 143, 0.1);
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--navy);
  font-weight: 500;
  font-size: 0.95rem;
}

.modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.btn-submit {
	background-color: #0d004d;
	color: #ffffff;
	border: none;
	border-radius: 10px;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.btn-cancel {
	background-color: #ffffff;
	color: #3d42c8;
	border: 1px solid #3d42c8;
	border-radius: 10px;
	padding: 10px 24px;
	font-size: 14px !important;
	font-weight: 600;
	cursor: pointer;
}

.admin-action.delete {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.12);
  border: 1px solid rgba(220, 53, 69, 0.25);
}

.admin-action.delete:hover,
.admin-action.delete:focus {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
}

/* =========================================
   Navbar Base & Layout
   ========================================= */
.admin-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  background-color: #ffffff;
  /* box-shadow: 0 2px 30px rgba(0, 0, 0, 0.2); */
}

.nav-brand-link {
  text-decoration: none;
}

/* =========================================
   Desktop Navigation Links (Centered)
   ========================================= */
.nav-links-desktop {
  /* Absolute positioning guarantees perfect centering regardless of logo width */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link-item {
  position: relative;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.3s ease;
}

/* Hover Underline Animation (Starts from Right for RTL) */
.nav-link-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0; 
  width: 0;
  height: 3px;
  background-color: var(--primary, #3d42c8); 
  border-radius: 4px;
  transition: width 0.3s ease-in-out;
}

.nav-link-item:hover,
.nav-link-item.active {
  color: var(--primary, #3d42c8);
}

.nav-link-item:hover::after,
.nav-link-item.active::after {
  width: 100%;
}

/* Hide desktop links on smaller screens */
@media (max-width: 992px) {
  .nav-links-desktop {
    display: none; 
  }
}

/* =========================================
   Mobile Hamburger Menu
   ========================================= */
.mobile-toggle-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--navy, #120e43);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.mobile-toggle-btn:focus {
  outline: none;
}

.mobile-nav-menu {
  display: none;
  flex-direction: column;
  background-color: #ffffff;
  border-top: 1px solid rgba(45, 48, 143, 0.08);
  padding: 12px 24px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
  position: absolute;
  width: 100%;
  z-index: 999;
  margin-top: 70px;
}

.mobile-nav-menu.active {
  display: flex;
  animation: slideDown 0.3s ease-out;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-item {
  display: block;
  color: var(--navy, #120e43);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 0;
  transition: color 0.2s;
}

.mobile-nav-item.active {
  color: var(--primary, #3d42c8);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 576px) {
	.form-grid {
		grid-template-columns: 1fr;
	}

	.modal-card {
		padding: 24px 18px 20px;
	}

	.modal-actions {
		flex-direction: column-reverse;
	}

	.btn-submit,
	.btn-cancel {
		width: 100%;
	}
}

@media (max-width: 992px) {
	.admin-header {
		margin-bottom: 20px;
	}

	.admin-toolbar {
		padding: 16px;
	}

	.admin-search {
		max-width: 100%;
		width: 100%;
	}

	.admin-filter {
		flex: 1 1 180px;
	}
}

@media (max-width: 576px) {
	.admin-shell {
		padding: 18px 12px 32px;
	}

	.admin-toolbar {
		padding: 14px 12px;
	}

	.admin-tool-row {
		gap: 10px;
	}

	.admin-search,
	.admin-filter,
	.btn-admin-primary,
	.btn-admin-filter {
		width: 100%;
		max-width: none;
		flex: 1 1 100%;
	}

	.admin-table-header {
		padding: 14px 12px 10px;
	}

	.admin-section-title {
		font-size: 1.35rem;
	}
}

