/**
 * Confirmation page styles. Dark PES theme, matching the account portal.
 * Scoped to .pes-invite so nothing leaks into the theme.
 */

.pes-invite {
	--pes-gold: #d4af37;
	--pes-bg: #141414;
	--pes-border: #262626;
	--pes-text: #f5f5f5;
	--pes-muted: #8a8a8a;

	max-width: 460px;
	margin: 2rem auto;
	padding: 2rem;
	background: var(--pes-bg);
	border: 1px solid var(--pes-border);
	border-radius: 12px;
	color: var(--pes-text);
}

.pes-invite__title {
	margin: 0 0 .5rem;
	font-size: 1.35rem;
	font-weight: 700;
	color: #fff;
}

.pes-invite__intro {
	margin: 0 0 1.5rem;
	color: var(--pes-muted);
	font-size: .9rem;
}

.pes-invite__label {
	display: block;
	margin-bottom: .45rem;
	color: var(--pes-muted);
	font-size: .7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
}

.pes-invite__input {
	width: 100%;
	padding: .75rem .9rem;
	background: #0f0f0f !important;
	border: 1px solid var(--pes-border) !important;
	border-radius: 8px;
	color: var(--pes-text) !important;
	font-size: 1.1rem;
	letter-spacing: .15em;
	text-transform: uppercase;
}

.pes-invite__input:focus {
	outline: none;
	border-color: var(--pes-gold) !important;
}

.pes-invite__btn {
	width: 100%;
	margin-top: 1.25rem;
	padding: .75rem 1rem;
	background: var(--pes-gold);
	color: #1a1a1a;
	border: none;
	border-radius: 8px;
	font-size: .95rem;
	font-weight: 700;
	cursor: pointer;
}

.pes-invite__btn:hover {
	opacity: .9;
}

.pes-invite__error {
	padding: .8rem 1rem;
	margin-bottom: 1.25rem;
	background: rgba(220, 80, 80, .12);
	border: 1px solid rgba(220, 80, 80, .3);
	border-radius: 8px;
	color: #e08484;
	font-size: .9rem;
}

.pes-invite__done h2 {
	margin: 0 0 .5rem;
	color: var(--pes-gold);
	font-size: 1.35rem;
}

.pes-invite__done p {
	margin: 0;
	color: var(--pes-muted);
	font-size: .92rem;
}

/* =========================================================================
 * Invitations management screen ([pes_invitations])
 * ========================================================================= */

.pes-inv {
	--pes-gold: #d4af37;
	--pes-surface: #141414;
	--pes-surface-2: #1c1c1c;
	--pes-border: #262626;
	--pes-text: #f5f5f5;
	--pes-muted: #8a8a8a;
	color: var(--pes-text);
}

.pes-inv__title {
	margin: 0 0 1.25rem;
	font-size: 1.55rem;
	font-weight: 700;
	color: #fff;
}

.pes-inv__denied {
	padding: 1rem;
	color: var(--pes-muted);
}

/* Toolbar */
.pes-inv__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.pes-inv__filters {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
}

.pes-inv__filter {
	padding: .4rem .75rem;
	background: var(--pes-surface);
	border: 1px solid var(--pes-border);
	border-radius: 999px;
	color: var(--pes-muted);
	text-decoration: none;
	font-size: .78rem;
	font-weight: 600;
}

.pes-inv__filter span {
	opacity: .65;
}

.pes-inv__filter:hover {
	color: var(--pes-text);
}

.pes-inv__filter.is-active {
	background: rgba(212, 175, 55, .12);
	border-color: rgba(212, 175, 55, .35);
	color: var(--pes-gold);
}

.pes-inv__search {
	display: flex;
	gap: .4rem;
}

.pes-inv__search input {
	padding: .5rem .75rem;
	min-width: 240px;
	background: #0f0f0f !important;
	border: 1px solid var(--pes-border) !important;
	border-radius: 8px;
	color: var(--pes-text) !important;
	font-size: .85rem;
}

.pes-inv__search input:focus {
	outline: none;
	border-color: var(--pes-gold) !important;
}

.pes-inv__search button {
	padding: .5rem .9rem;
	background: var(--pes-surface-2);
	border: 1px solid var(--pes-border);
	border-radius: 8px;
	color: var(--pes-text);
	font-size: .85rem;
	font-weight: 600;
	cursor: pointer;
}

/* Table */
.pes-inv__table-wrap {
	overflow-x: auto;
	background: var(--pes-surface);
	border: 1px solid var(--pes-border);
	border-radius: 12px;
}

.pes-inv__table {
	width: 100%;
	border-collapse: collapse;
	font-size: .85rem;
}

.pes-inv__table thead th {
	padding: .85rem 1rem;
	text-align: left;
	color: var(--pes-muted);
	font-size: .68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	border-bottom: 1px solid var(--pes-border);
	white-space: nowrap;
}

.pes-inv__table tbody td {
	padding: .8rem 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, .04);
	white-space: nowrap;
}

.pes-inv__table tbody tr:last-child td {
	border-bottom: none;
}

.pes-inv__table tbody tr:hover {
	background: var(--pes-surface-2);
}

.pes-inv__cb {
	width: 36px;
	text-align: center;
}

.pes-inv__name {
	font-weight: 600;
}

.pes-inv__muted {
	color: #5a5a5a;
	font-style: italic;
}

.pes-inv__empty {
	padding: 2rem 1rem !important;
	text-align: center;
	color: var(--pes-muted);
}

/* Status badges */
.pes-inv__badge {
	display: inline-block;
	padding: .22rem .6rem;
	border-radius: 999px;
	font-size: .72rem;
	font-weight: 600;
}

.pes-inv__badge--registered {
	background: rgba(63, 181, 107, .14);
	color: #3fb56b;
}

.pes-inv__badge--confirmed {
	background: rgba(212, 175, 55, .14);
	color: var(--pes-gold);
}

.pes-inv__badge--invited {
	background: rgba(90, 150, 220, .14);
	color: #7aa8e0;
}

.pes-inv__badge--not_invited {
	background: rgba(138, 138, 138, .14);
	color: #b0b0b0;
}

.pes-inv__badge--no_email {
	background: rgba(138, 138, 138, .08);
	color: #6a6a6a;
}

/* Actions + notices + pager */
.pes-inv__actions {
	margin-top: 1.25rem;
}

.pes-inv__btn {
	padding: .7rem 1.2rem;
	background: var(--pes-gold);
	color: #1a1a1a;
	border: none;
	border-radius: 8px;
	font-size: .88rem;
	font-weight: 700;
	cursor: pointer;
}

.pes-inv__btn:hover {
	opacity: .9;
}

.pes-inv__notice {
	padding: .75rem 1rem;
	margin-bottom: 1rem;
	border-radius: 8px;
	font-size: .88rem;
}

.pes-inv__notice--ok {
	background: rgba(63, 181, 107, .12);
	border: 1px solid rgba(63, 181, 107, .3);
	color: #3fb56b;
}

.pes-inv__notice--warn {
	background: rgba(212, 175, 55, .12);
	border: 1px solid rgba(212, 175, 55, .3);
	color: var(--pes-gold);
}

.pes-inv__pager {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 1.25rem;
	color: var(--pes-muted);
	font-size: .85rem;
}

.pes-inv__pager .page-numbers {
	padding: .35rem .65rem;
	background: var(--pes-surface);
	border: 1px solid var(--pes-border);
	border-radius: 6px;
	color: var(--pes-text);
	text-decoration: none;
}

.pes-inv__pager .page-numbers.current {
	background: rgba(212, 175, 55, .12);
	border-color: rgba(212, 175, 55, .35);
	color: var(--pes-gold);
}

/* Approvals — per-row action buttons */
.pes-inv__row-actions {
	display: flex;
	gap: .4rem;
}

.pes-inv__row-actions form {
	margin: 0;
}

.pes-inv__btn--sm {
	padding: .35rem .8rem;
	font-size: .78rem;
}

.pes-inv__btn--ghost {
	background: transparent;
	border: 1px solid var(--pes-border);
	color: var(--pes-muted);
}

.pes-inv__btn--ghost:hover {
	color: var(--pes-text);
	border-color: #3a3a3a;
}

/* Password fields: normal casing, no code-style letter spacing */
.pes-invite__input--plain {
	letter-spacing: normal;
	text-transform: none;
	font-size: .95rem;
}

.pes-invite__form .pes-invite__label {
	margin-top: 1rem;
}

.pes-invite__form .pes-invite__label:first-of-type {
	margin-top: 0;
}

/* Inline email entry for contacts with none on file */
.pes-inv__manual-input {
	width: 100%;
	min-width: 170px;
	padding: .35rem .55rem;
	background: #0f0f0f !important;
	border: 1px solid var(--pes-border) !important;
	border-radius: 6px;
	color: var(--pes-text) !important;
	font-size: .8rem;
}

.pes-inv__manual-input:focus {
	outline: none;
	border-color: var(--pes-gold) !important;
}

.pes-inv__tag {
	padding: .12rem .4rem;
	background: rgba(212, 175, 55, .12);
	border-radius: 4px;
	color: var(--pes-gold);
	font-size: .68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
}

/* Code cell: code plus how long it stays valid */
.pes-inv__code {
	display: block;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: .05em;
}

.pes-inv__expiry {
	display: block;
	margin-top: .15rem;
	color: var(--pes-muted);
	font-size: .68rem;
}

.pes-inv__expiry--past {
	color: #e08484;
}

.pes-inv__badge--expired {
	background: rgba(220, 80, 80, .12);
	color: #e08484;
}

/* Per-company account tallies */
.pes-inv__tally {
	display: inline-block;
	margin-right: .3rem;
	padding: .18rem .5rem;
	background: rgba(63, 181, 107, .12);
	border-radius: 999px;
	color: #3fb56b;
	font-size: .7rem;
	font-weight: 600;
}

.pes-inv__tally--pending {
	background: rgba(212, 175, 55, .12);
	color: var(--pes-gold);
}

/* Email field in each row */
.pes-inv__email-input {
	width: 100%;
	min-width: 200px;
	padding: .35rem .55rem;
	background: #0f0f0f !important;
	border: 1px solid var(--pes-border) !important;
	border-radius: 6px;
	color: var(--pes-text) !important;
	font-size: .8rem;
}

.pes-inv__email-input:focus {
	outline: none;
	border-color: var(--pes-gold) !important;
}

.pes-invite__optional {
	color: var(--pes-muted);
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}

.pes-inv__badge--no_email {
	background: rgba(138, 138, 138, .08);
	color: #6a6a6a;
}

/* Accordion: company row expands to reveal its people */
.pes-inv__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	background: transparent;
	border: none;
	color: var(--pes-muted);
	cursor: pointer;
	transition: transform .15s, color .15s;
}

.pes-inv__toggle:hover {
	color: var(--pes-gold);
}

.pes-inv__toggle svg {
	width: 15px;
	height: 15px;
}

.pes-inv__toggle.is-open {
	transform: rotate(90deg);
	color: var(--pes-gold);
}

.pes-inv__drawer > td {
	padding: 0 !important;
	background: #0d0d0d;
}

/* Nested table of people */
.pes-inv__people {
	width: 100%;
	border-collapse: collapse;
	font-size: .8rem;
}

.pes-inv__people thead th {
	padding: .6rem 1rem;
	text-align: left;
	color: var(--pes-muted);
	font-size: .64rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	border-bottom: 1px solid var(--pes-border);
	white-space: nowrap;
}

.pes-inv__people tbody td {
	padding: .6rem 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, .03);
	white-space: nowrap;
}

.pes-inv__people tbody tr:last-child td {
	border-bottom: none;
}

.pes-inv__people tbody tr:hover {
	background: rgba(255, 255, 255, .02);
}

.pes-inv__company td {
	cursor: default;
}

.pes-inv__badge--in_progress {
	background: rgba(212, 175, 55, .14);
	color: var(--pes-gold);
}