/* Novin Referral — customer dashboard */

.nrf-wrap {
	--nrf-radius: 12px;
	--nrf-border: #e6e6e6;
	--nrf-muted: #767676;
	--nrf-accent: var(--main-color, #d12026);
	display: flex;
	flex-direction: column;
	gap: 20px;
	font-family: inherit;
}

/* Hero */
.nrf-hero {
	background: linear-gradient(135deg, #2b3a67 0%, #4a5d9e 100%);
	color: #fff;
	border-radius: var(--nrf-radius);
	padding: 22px;
}

.nrf-hero__title {
	margin: 0 0 8px;
	font-size: 17px;
	color: #fff;
}

.nrf-hero__desc {
	margin: 0 0 16px;
	font-size: 13px;
	line-height: 1.9;
	opacity: .9;
}

.nrf-hero__code {
	margin: 12px 0 0;
	font-size: 13px;
	opacity: .9;
}

.nrf-hero__code strong {
	letter-spacing: 2px;
	direction: ltr;
	display: inline-block;
}

/* Copy box */
.nrf-copy {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.nrf-wrap .nrf-copy__input {
	flex: 1 1 240px;
	min-width: 0;
	min-height: 44px;
	direction: ltr;
	text-align: left;
	margin: 0;
	padding: 0 12px;
	border-radius: 8px;
	border: none;
	font-size: 13px;
	background: rgba(255, 255, 255, .95);
	color: #222;
}

.nrf-wrap .nrf-copy__btn,
.nrf-wrap button.nrf-copy__btn {
	/* Woodmart styles every <button> via :is(.btn,.button,button,…) with these
	   vars; setting them here keeps the override honest instead of fighting
	   the theme property by property. */
	--btn-bgcolor: #fff;
	--btn-color: #2b3a67;
	--btn-bgcolor-hover: #fff;
	--btn-color-hover: #2b3a67;
	--btn-height: 44px;
	--btn-padding: 0 22px;
	--btn-brd-radius: 8px;
	--btn-transform: none;
	--btn-font-size: 13px;
	--btn-font-weight: 700;
	--btn-box-shadow: none;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 22px;
	margin: 0;
	border: none !important;
	border-radius: 8px !important;
	background-color: #fff !important;
	color: #2b3a67 !important;
	font-weight: 700;
	font-size: 13px;
	font-family: inherit;
	line-height: 1.2;
	text-transform: none !important;
	letter-spacing: normal;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none !important;
	transition: opacity .2s, transform .15s;
}

.nrf-wrap .nrf-copy__btn:hover,
.nrf-wrap button.nrf-copy__btn:hover {
	background-color: #fff !important;
	color: #2b3a67 !important;
	opacity: .88;
	transform: translateY(-1px);
}

/* Stats */
.nrf-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.nrf-stat {
	background: #f7f7f7;
	border: 1px solid var(--nrf-border);
	border-radius: var(--nrf-radius);
	padding: 16px 12px;
	text-align: center;
}

.nrf-stat--green {
	background: #eefaf1;
	border-color: #cdebd6;
}

.nrf-stat--amber {
	background: #fff7e8;
	border-color: #f3e0b8;
}

.nrf-stat__num {
	display: block;
	font-size: 17px;
	font-weight: 700;
	margin-bottom: 6px;
}

.nrf-stat__label {
	display: block;
	font-size: 12px;
	color: var(--nrf-muted);
}

/* Card */
.nrf-card {
	background: #fff;
	border: 1px solid var(--nrf-border);
	border-radius: var(--nrf-radius);
	padding: 20px;
}

.nrf-card__title {
	margin: 0 0 16px;
	font-size: 15px;
}

/* Form */
.nrf-form__row {
	display: grid;
	grid-template-columns: repeat(3, 1fr) auto;
	align-items: end;
	gap: 12px;
	margin-bottom: 4px;
}

/* Button sits in the grid so it aligns with the inputs, not under them. */
.nrf-field--action span {
	visibility: hidden;
}

.nrf-wrap .nrf-field--action .nrf-btn {
	width: 100%;
}

.nrf-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
}

.nrf-wrap .nrf-field input {
	min-height: 44px;
	padding: 0 12px;
	margin: 0;
	border: 1px solid var(--nrf-border) !important;
	border-radius: 8px !important;
	font-size: 13px;
	font-family: inherit;
	line-height: 1.2;
	width: 100%;
	background-color: #fff !important;
	color: #333;
	box-shadow: none !important;
	box-sizing: border-box;
}

.nrf-field input:focus {
	outline: 2px solid var(--nrf-accent);
	outline-offset: 1px;
}

.nrf-wrap .nrf-btn,
.nrf-wrap button.nrf-btn {
	--btn-bgcolor: var(--nrf-accent);
	--btn-color: #fff;
	--btn-bgcolor-hover: var(--nrf-accent);
	--btn-color-hover: #fff;
	--btn-height: 44px;
	--btn-padding: 0 28px;
	--btn-brd-radius: 8px;
	--btn-transform: none;
	--btn-font-size: 13px;
	--btn-font-weight: 700;
	--btn-box-shadow: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 28px;
	margin: 0;
	border: none !important;
	border-radius: 8px !important;
	background-color: var(--nrf-accent) !important;
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
	line-height: 1.2;
	text-transform: none !important;
	letter-spacing: normal;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none !important;
	transition: opacity .2s, transform .15s;
}

.nrf-wrap .nrf-btn:hover,
.nrf-wrap button.nrf-btn:hover {
	background-color: var(--nrf-accent) !important;
	color: #fff !important;
	opacity: .9;
	transform: translateY(-1px);
}

.nrf-wrap .nrf-btn:disabled,
.nrf-wrap button.nrf-btn:disabled {
	opacity: .6 !important;
	cursor: not-allowed;
	transform: none;
}

.nrf-wrap .nrf-btn--ghost,
.nrf-wrap button.nrf-btn--ghost {
	--btn-bgcolor: #fff;
	--btn-color: #333;
	--btn-bgcolor-hover: #f7f7f7;
	--btn-color-hover: #333;
	background-color: #fff !important;
	color: #333 !important;
	border: 1px solid var(--nrf-border) !important;
}

.nrf-wrap .nrf-btn--ghost:hover,
.nrf-wrap button.nrf-btn--ghost:hover {
	background-color: #f7f7f7 !important;
	color: #333 !important;
}

.nrf-form__msg {
	margin-top: 12px;
	font-size: 13px;
	line-height: 1.8;
}

.nrf-form__msg.is-error {
	color: #c0392b;
}

.nrf-form__msg.is-success {
	color: #1e8449;
}

.nrf-hint {
	margin: 14px 0 0;
	font-size: 12px;
	color: var(--nrf-muted);
	line-height: 1.9;
}

/* Filters */
.nrf-filters {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	flex-wrap: nowrap;
}

.nrf-wrap .nrf-filters input,
.nrf-wrap .nrf-filters select {
	min-height: 44px;
	padding: 0 12px;
	margin: 0;
	border: 1px solid var(--nrf-border) !important;
	border-radius: 8px !important;
	font-size: 13px;
	font-family: inherit;
	line-height: 1.2;
	background-color: #fff !important;
	color: #333;
	box-shadow: none !important;
	box-sizing: border-box;
	max-width: 100%;
}

.nrf-filters input {
	flex: 1 1 auto;
	min-width: 0;
}

.nrf-wrap .nrf-filters select {
	flex: 0 1 190px;
	min-width: 130px;
}

.nrf-wrap .nrf-filters .nrf-btn {
	flex: 0 0 auto;
}

/* Table */
.nrf-table-wrap {
	overflow-x: auto;
}

.nrf-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.nrf-table th,
.nrf-table td {
	padding: 11px 10px;
	text-align: right;
	border-bottom: 1px solid var(--nrf-border);
	white-space: nowrap;
}

.nrf-table th {
	font-weight: 700;
	color: var(--nrf-muted);
	font-size: 12px;
}

.nrf-ltr {
	direction: ltr;
	text-align: right;
}

.nrf-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	background: #eee;
	color: #555;
}

.nrf-badge--registered {
	background: #e3f6e8;
	color: #1e8449;
}

.nrf-badge--sent {
	background: #e8f0fb;
	color: #2b5aa8;
}

.nrf-badge--failed {
	background: #fdeaea;
	color: #c0392b;
}

.nrf-empty {
	margin: 0;
	padding: 24px 0;
	text-align: center;
	color: var(--nrf-muted);
	font-size: 13px;
}

/* Pagination */
.nrf-pagination {
	display: flex;
	gap: 6px;
	margin-top: 16px;
	flex-wrap: wrap;
	justify-content: center;
}

.nrf-wrap a.nrf-page,
.nrf-wrap .nrf-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	min-height: 38px;
	padding: 0 10px;
	text-align: center;
	border: 1px solid var(--nrf-border);
	border-radius: 8px;
	font-size: 13px;
	text-decoration: none;
	color: #333;
}

.nrf-wrap a.nrf-page.is-active,
.nrf-wrap .nrf-page.is-active {
	background-color: var(--nrf-accent) !important;
	border-color: var(--nrf-accent);
	color: #fff !important;
}

.nrf-notice {
	padding: 16px;
	background: #f7f7f7;
	border-radius: var(--nrf-radius);
	font-size: 13px;
}

/* Responsive */
@media (max-width: 1100px) {
	.nrf-form__row {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 880px) {
	.nrf-stats {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.nrf-form__row {
		grid-template-columns: 1fr;
	}

	.nrf-field--action span {
		display: none;
	}

	.nrf-filters {
		flex-wrap: wrap;
	}

	.nrf-wrap .nrf-filters input,
	.nrf-wrap .nrf-filters select,
	.nrf-wrap .nrf-filters .nrf-btn {
		flex: 1 1 100%;
	}
}

@media (max-width: 420px) {
	.nrf-stats {
		grid-template-columns: 1fr;
	}
}

/* Sidebar promo button (rendered inside the woodmart-plus navigation template) */
.nrf_sidebar_promo {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
	padding: 12px 14px;
	border-radius: 12px;
	text-decoration: none;
	color: #fff !important;
	background: linear-gradient(135deg, #f7971e 0%, #ff4e50 100%);
	box-shadow: 0 4px 14px rgba(255, 78, 80, .35);
	position: relative;
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease;
}

.nrf_sidebar_promo:hover {
	transform: translateY(-2px);
	box-shadow: 0 7px 20px rgba(255, 78, 80, .45);
	color: #fff !important;
}

/* Sweeping shine to draw the eye */
.nrf_sidebar_promo::after {
	content: "";
	position: absolute;
	top: 0;
	inset-inline-start: -60%;
	width: 40%;
	height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .45), transparent);
	animation: nrf-shine 3.2s ease-in-out infinite;
}

@keyframes nrf-shine {
	0%, 65% { inset-inline-start: -60%; }
	100% { inset-inline-start: 120%; }
}

@media (prefers-reduced-motion: reduce) {
	.nrf_sidebar_promo::after { animation: none; }
	.nrf_sidebar_promo:hover { transform: none; }
}

.nrf_sidebar_promo__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .22);
}

.nrf_sidebar_promo__text {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	line-height: 1.5;
	min-width: 0;
}

.nrf_sidebar_promo__text strong {
	font-size: 13px;
	font-weight: 700;
}

.nrf_sidebar_promo__text small {
	font-size: 11px;
	opacity: .92;
}

.nrf_sidebar_promo i {
	flex: 0 0 auto;
	font-size: 12px;
	opacity: .85;
}
