/* Nizva Rate - Admin Styles */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700&display=swap');

.nr-admin {
	font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.nr-admin h1 {
	font-weight: 700;
}

.nr-admin-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
	margin: 24px 0;
}

.nr-stat-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	text-align: center;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	border-top: 4px solid #6366f1;
}

.nr-stat-card--blue { border-top-color: #3b82f6; }
.nr-stat-card--purple { border-top-color: #8b5cf6; }
.nr-stat-card--gold { border-top-color: #f59e0b; }

.nr-stat-value {
	font-size: 2.5rem;
	font-weight: 800;
	color: #1e293b;
	line-height: 1;
}

.nr-stat-label {
	font-size: 0.9rem;
	color: #64748b;
	margin-top: 8px;
}

.nr-admin-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
	gap: 24px;
	margin-top: 24px;
}

.nr-charts-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	margin: 24px 0;
}

.nr-charts-grid.nr-charts-grid--single {
	grid-template-columns: 1fr;
}

.nr-chart-wrap--tall {
	height: max(400px, 50vh);
	min-height: 400px;
}

.nr-chart-note {
	color: #64748b;
	font-size: 0.9rem;
	margin: -8px 0 16px;
}

.nr-chart-panel--wide {
	grid-column: 1 / -1;
}

.nr-admin-panel {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.nr-chart-panel h2 {
	margin-top: 0;
	font-size: 1rem;
	padding-bottom: 12px;
	border-bottom: 1px solid #f1f5f9;
	color: #334155;
}

.nr-chart-wrap {
	position: relative;
	height: 280px;
}

.nr-chart-wrap--square {
	height: 260px;
	max-width: 360px;
	margin: 0 auto;
}

.nr-admin-panel h2 {
	margin-top: 0;
	font-size: 1.1rem;
	padding-bottom: 12px;
	border-bottom: 1px solid #f1f5f9;
}

.nr-filters-bar {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px 24px;
	margin: 20px 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.nr-filters-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
}

.nr-filter-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 180px;
	flex: 1;
}

.nr-filter-group label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #475569;
}

.nr-filter-select {
	padding: 8px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-family: inherit;
	font-size: 0.95rem;
	background: #f8fafc;
	min-width: 180px;
}

.nr-filter-group--actions {
	flex-direction: row;
	align-items: flex-end;
	gap: 8px;
	flex: 0;
	min-width: auto;
}

.nr-filter-group--actions label {
	display: none;
}

.nr-admin-notice {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 8px;
	padding: 16px 20px;
	margin: 16px 0;
}

.nr-admin-notice__icon {
	font-size: 1.2em;
	line-height: 1;
}

.nr-admin-notice--info a {
	font-weight: 600;
}

.nr-admin-toolbar {
	display: flex;
	gap: 8px;
	margin-top: 16px;
	flex-wrap: wrap;
}

.nr-stars-inline {
	color: #f59e0b;
	letter-spacing: 1px;
}

.nr-empty-msg {
	color: #94a3b8;
	font-style: italic;
	padding: 16px 0;
}

.nr-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
}

.nr-modal[hidden] {
	display: none !important;
}

.nr-modal-content {
	background: #fff;
	border-radius: 12px;
	padding: 32px;
	max-width: 480px;
	width: 90%;
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.nr-modal-content h2 {
	margin-top: 0;
}

@media (max-width: 960px) {
	.nr-charts-grid {
		grid-template-columns: 1fr;
	}

	.nr-chart-panel--wide {
		grid-column: auto;
	}
}

@media (max-width: 782px) {
	.nr-admin-grid {
		grid-template-columns: 1fr;
	}

	.nr-filters-row {
		flex-direction: column;
	}

	.nr-filter-group {
		width: 100%;
	}
}

.nr-pending-search-form,
.nr-pending-filters {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.nr-pending-note {
	margin: 12px 0 0;
	color: #64748b;
	font-size: 0.9rem;
}

.nr-pending-admin .description {
	margin-bottom: 16px;
}

.nr-pending-date-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nr-pending-date-field label {
	font-size: 12px;
	font-weight: 600;
	color: #475569;
}

.nr-date-field {
	position: relative;
	display: inline-block;
	min-width: 160px;
}

.nr-date-field .nr-date-input,
.nr-date-field .regular-text.nr-date-input {
	padding-left: 32px;
	cursor: pointer;
	background: #fff;
}

.nr-date-field__icon {
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: #64748b;
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.nr-pending-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: flex-end;
}

.nr-jalali-picker {
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
	padding: 12px;
	min-width: 260px;
	z-index: 100020;
}

.nr-jalali-picker__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
	gap: 8px;
}

.nr-jalali-picker__title {
	font-weight: 700;
	font-size: 0.95rem;
	color: #1e293b;
	flex: 1;
	text-align: center;
}

.nr-jalali-picker__nav {
	border: 1px solid #e2e8f0;
	background: #f8fafc;
	border-radius: 6px;
	padding: 4px 10px;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.8rem;
	color: #475569;
}

.nr-jalali-picker__nav:hover {
	background: #eef2ff;
	border-color: #c7d2fe;
}

.nr-jalali-picker__weekdays,
.nr-jalali-picker__days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	text-align: center;
}

.nr-jalali-picker__weekdays {
	margin-bottom: 6px;
	font-size: 0.75rem;
	font-weight: 700;
	color: #64748b;
}

.nr-jalali-picker__day {
	border: none;
	background: #f8fafc;
	border-radius: 6px;
	padding: 6px 0;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.85rem;
	color: #334155;
}

.nr-jalali-picker__day:hover {
	background: #eef2ff;
	color: #4338ca;
}

.nr-jalali-picker__day.is-selected {
	background: #6366f1;
	color: #fff;
}

.nr-jalali-picker__day--empty {
	background: transparent;
	pointer-events: none;
}

.nr-pending-missing {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid #e2e8f0;
}

.nr-pending-missing h3 {
	margin: 0 0 12px;
	font-size: 1rem;
	color: #334155;
}

.nr-pending-missing__empty {
	margin: 0;
	color: #64748b;
	font-size: 0.95rem;
}

.nr-pending-missing__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nr-pending-missing__item {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 0.95rem;
	color: #475569;
}

.nr-pending-missing__item strong {
	color: #1e293b;
	font-weight: 600;
}

.nr-pending-missing__item span {
	margin: 0 4px;
}

/* UI icons & emojis */
.nr-page-title {
	display: flex;
	align-items: center;
	gap: 10px;
}

.nr-page-title__icon {
	font-size: 1.4em;
	line-height: 1;
}

.nr-panel-title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.nr-panel-title__icon {
	font-size: 1.15em;
	line-height: 1;
}

.nr-stat-card {
	position: relative;
	padding-top: 52px;
}

.nr-stat-icon {
	position: absolute;
	top: 16px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 1.75rem;
	line-height: 1;
}

.nr-empty-msg {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
	padding: 24px 16px;
	color: #64748b;
}

.nr-empty-msg__icon {
	font-size: 2rem;
	line-height: 1;
	opacity: 0.85;
}

.nr-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 500;
}

.nr-status-badge--active { color: #16a34a; }
.nr-status-badge--inactive { color: #dc2626; }

.nr-admin .button .dashicons,
.nr-admin a.button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	margin-left: 4px;
	vertical-align: text-bottom;
	line-height: 1.2;
}

/* Dashboard */
.nr-dashboard {
	max-width: 720px;
}

.nr-dashboard-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 8px 0;
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
	margin-top: 20px;
}

.nr-dashboard-row {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 18px 24px;
	border-bottom: 1px solid #f1f5f9;
}

.nr-dashboard-row:last-child {
	border-bottom: none;
}

.nr-dashboard-row__icon {
	color: #6366f1;
	font-size: 22px;
	width: 22px;
	height: 22px;
	margin-top: 2px;
	flex-shrink: 0;
}

.nr-dashboard-row__body {
	min-width: 0;
}

.nr-dashboard-row__label {
	display: block;
	font-size: 0.82rem;
	color: #64748b;
	margin-bottom: 4px;
	font-weight: 600;
}

.nr-dashboard-row__value {
	font-size: 1rem;
	color: #1e293b;
	font-weight: 600;
	word-break: break-all;
}

.nr-dashboard-row__link {
	color: #4f46e5;
	text-decoration: none;
}

.nr-dashboard-row__link:hover {
	text-decoration: underline;
}

.nr-page-title .dashicons.nr-page-title__icon {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: #6366f1;
}

/* Dashboard */
.nr-dashboard {
	max-width: 720px;
}

.nr-dashboard-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 8px 0;
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
	margin-top: 20px;
}

.nr-dashboard-row {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 18px 22px;
	border-bottom: 1px solid #f1f5f9;
}

.nr-dashboard-row:last-child {
	border-bottom: none;
}

.nr-dashboard-row__icon {
	color: #6366f1;
	font-size: 22px;
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	margin-top: 2px;
}

.nr-dashboard-row__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.nr-dashboard-row__label {
	font-size: 0.82rem;
	color: #64748b;
	font-weight: 600;
}

.nr-dashboard-row__value {
	font-size: 1rem;
	color: #1e293b;
	font-weight: 600;
	word-break: break-all;
}

.nr-dashboard-row__link {
	color: #4f46e5;
	text-decoration: none;
}

.nr-dashboard-row__link:hover {
	text-decoration: underline;
}

.nr-page-title .dashicons.nr-page-title__icon {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: #6366f1;
}

.nr-pending-missing__item::before {
	content: '⏳';
	margin-left: 8px;
}

.nr-pending-missing__empty::before {
	content: '✅ ';
}

.nr-pending-missing h3::before {
	content: '👥 ';
}

.nr-pending-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #16a34a;
	font-size: 0.9em;
}

.nr-reports-tabs .nav-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
