/* ==========================================================================
   Kingdom Page — [invictus_kingdom]
   Aligned with Glory Claims design language
   Mobile-first · Siege Night palette · Rajdhani + Inter
   ========================================================================== */

/* ── Design Tokens ── */
:root {
	--inv-bg:           #080d1a;
	--inv-bg-2:         #0d1424;
	--inv-bg-3:         #111827;
	--inv-border:       rgba(255, 255, 255, 0.06);
	--inv-border-hover: rgba(245, 158, 11, 0.4);
	--inv-gold:         #f59e0b;
	--inv-gold-dim:     rgba(245, 158, 11, 0.12);
	--inv-text:         #f0f4ff;
	--inv-text-muted:   #6b7494;
	--inv-text-dim:     #3d4560;
	--inv-success:      #22c55e;
	--inv-success-bg:   rgba(34, 197, 94, 0.08);
	--inv-error:        #ef4444;
	--inv-error-bg:     rgba(239, 68, 68, 0.08);
	--inv-radius:       12px;
	--inv-radius-sm:    8px;
}

/* ── 0. Animations ── */
@keyframes inv-fadeInUp {
	from { opacity: 0; transform: translateY(24px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes inv-shimmer {
	0%   { background-position: -200% center; }
	100% { background-position: 200% center; }
}

@keyframes inv-glowPulse {
	0%, 100% { opacity: 0.6; }
	50%      { opacity: 1; }
}

@keyframes inv-pulseRing {
	0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
	50%      { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

/* ── 1. Main Wrapper ── */
.inv-kingdom-wrap {
	position: relative;
	background: var(--inv-bg);
	min-height: 100vh;
	font-family: 'Inter', sans-serif;
	color: var(--inv-text);
	-webkit-font-smoothing: antialiased;
	padding-top: 4rem;
	padding-bottom: 60px;
	overflow-x: hidden;
}

/* Ambient glow — matches glory hero */
.inv-kingdom-wrap::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 800px;
	height: 400px;
	background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
	pointer-events: none;
	z-index: 0;
}

/* Decorative dots — matches glory hero */
.inv-kingdom-wrap::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 500px;
	background-image: radial-gradient(circle, rgba(245, 158, 11, 0.06) 1px, transparent 1px);
	background-size: 32px 32px;
	pointer-events: none;
	z-index: 0;
	mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 100%);
	-webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 100%);
}

/* ── 2. Tab Navigation ── */
.inv-kingdom-tabs {
	position: relative;
	z-index: 1;
	display: flex;
	gap: 0;
	border-bottom: 1px solid var(--inv-border);
	margin-bottom: 24px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 1.25rem;
}

.inv-kingdom-tab {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 14px 24px;
	color: var(--inv-text-muted);
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	transition: color 0.2s, border-color 0.2s, background 0.2s;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.inv-kingdom-tab svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.inv-kingdom-tab:hover {
	color: var(--inv-text);
	background: rgba(255, 255, 255, 0.03);
}

.inv-kingdom-tab.is-active {
	color: var(--inv-gold);
	border-bottom-color: var(--inv-gold);
	background: rgba(245, 158, 11, 0.06);
}

/* ── 3. Auth / Empty States ── */
.inv-kingdom-auth,
.inv-kingdom-pending {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 50vh;
	padding: 48px 20px;
	animation: inv-fadeInUp 0.6s ease both;
}

.inv-kingdom-auth svg,
.inv-kingdom-pending svg {
	width: 56px;
	height: 56px;
	color: var(--inv-text-dim);
	margin-bottom: 20px;
	filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.4));
	animation: inv-glowPulse 3s ease-in-out infinite;
}

.inv-kingdom-auth p,
.inv-kingdom-pending p {
	font-size: 0.92rem;
	color: var(--inv-text-muted);
	max-width: 360px;
	line-height: 1.6;
	margin: 0 0 24px;
}

/* ── 4. Kingdom Selection ── */
.inv-kingdom-select {
	position: relative;
	z-index: 1;
	padding: 48px 20px;
}

.inv-kingdom-select h2 {
	font-family: 'Rajdhani', sans-serif;
	font-size: clamp(1.4rem, 3vw, 1.8rem);
	font-weight: 700;
	color: var(--inv-text);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-align: center;
	margin: 0 0 32px;
}

/* ── Kingdom Search ── */
.inv-kingdom-search-wrap {
	position: relative;
	max-width: 480px;
	margin: 0 auto 20px;
}

.inv-kingdom-search-wrap > svg {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	color: var(--inv-text-muted);
	pointer-events: none;
}

.inv-kingdom-search {
	width: 100%;
	padding: 12px 16px 12px 40px;
	background: #131d30;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--inv-radius-sm);
	color: var(--inv-text);
	font-size: 0.9rem;
	font-family: 'Inter', sans-serif;
	transition: border-color 0.15s;
	outline: none;
}

.inv-kingdom-search::placeholder {
	color: #505880;
}

.inv-kingdom-search:focus {
	border-color: var(--inv-gold);
}

.inv-kingdom-search-count {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.72rem;
	color: var(--inv-text-dim);
	pointer-events: none;
}

/* ── Kingdom Grid ── */
.inv-kingdom-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	max-width: 1200px;
	margin: 0 auto;
}

/* ── Kingdom Card — matches glory event card exactly ── */
.inv-kingdom-card {
	position: relative;
	background: rgba(17, 24, 39, 0.7);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-top: 3px solid var(--inv-gold);
	border-radius: var(--inv-radius);
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
	animation: inv-fadeInUp 0.5s ease both;
}

/* Staggered card entry */
.inv-kingdom-card:nth-child(1)  { animation-delay: 0s; }
.inv-kingdom-card:nth-child(2)  { animation-delay: 0.05s; }
.inv-kingdom-card:nth-child(3)  { animation-delay: 0.1s; }
.inv-kingdom-card:nth-child(4)  { animation-delay: 0.15s; }
.inv-kingdom-card:nth-child(5)  { animation-delay: 0.2s; }
.inv-kingdom-card:nth-child(6)  { animation-delay: 0.25s; }
.inv-kingdom-card:nth-child(7)  { animation-delay: 0.3s; }
.inv-kingdom-card:nth-child(8)  { animation-delay: 0.35s; }
.inv-kingdom-card:nth-child(n+9) { animation-delay: 0.4s; }

.inv-kingdom-card:hover {
	border-color: rgba(245, 158, 11, 0.4);
	transform: translateY(-4px);
	box-shadow: 0 8px 32px rgba(245, 158, 11, 0.1);
}

.inv-kingdom-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.inv-kingdom-card__name {
	font-family: 'Rajdhani', sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--inv-text);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	display: flex;
	align-items: center;
	gap: 8px;
}

.inv-kingdom-card__name svg {
	width: 15px;
	height: 15px;
	color: var(--inv-gold);
	flex-shrink: 0;
}

.inv-kingdom-card__tier .inv-stellar-tier-badge {
	font-size: 0.65rem;
	padding: 2px 7px;
	border-radius: 3px;
	font-weight: 700;
	line-height: 1;
}

.inv-kingdom-card__stellar {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.75rem;
	color: var(--inv-text-muted);
	padding: 8px 12px;
	background: rgba(245, 158, 11, 0.06);
	border: 1px solid rgba(245, 158, 11, 0.12);
	border-radius: 8px;
}

.inv-kingdom-card__trophy {
	display: flex;
	align-items: center;
}

.inv-kingdom-card__trophy .inv-trophy {
	font-size: 0.85rem;
}

.inv-kingdom-card__trophy .inv-trophy__count {
	font-size: 0.65rem;
}

.inv-kingdom-card__pts {
	font-weight: 700;
	color: var(--inv-gold);
}

.inv-kingdom-card__rank {
	color: var(--inv-text-muted);
	font-weight: 600;
	margin-left: auto;
}

.inv-kingdom-card__desc {
	font-size: 0.82rem;
	color: var(--inv-text-muted);
	line-height: 1.55;
	margin: 0;
}

.inv-kingdom-card__stats {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 0.75rem;
	color: var(--inv-text-muted);
	border-top: 1px solid rgba(245, 158, 11, 0.1);
	padding-top: 12px;
	margin-top: auto;
}

.inv-kingdom-card__stats span {
	display: flex;
	align-items: center;
	gap: 5px;
}

.inv-kingdom-card__stats svg {
	width: 14px;
	height: 14px;
}

/* ── Join Button — filled amber with glow animation ── */
@keyframes inv-btnGlow {
	0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.2), 0 0 0 0 rgba(245, 158, 11, 0); }
	50%      { box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), 0 0 24px rgba(245, 158, 11, 0.1); }
}

.inv-kingdom-card__join {
	width: 100%;
	padding: 12px 24px;
	background: linear-gradient(135deg, #f59e0b, #d97706);
	color: #000;
	border: none;
	border-radius: 8px;
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.88rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
	margin-top: auto;
	animation: inv-btnGlow 3s ease-in-out infinite;
}

.inv-kingdom-card__join:hover {
	transform: translateY(-2px);
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4), 0 0 32px rgba(245, 158, 11, 0.15);
	animation: none;
}

.inv-kingdom-card__join:active {
	transform: translateY(0);
	box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.inv-kingdom-card__join:focus-visible {
	outline: 2px solid #fbbf24;
	outline-offset: 2px;
}

/* ── Load More — glory claims secondary button ── */
.inv-kingdom-load-more-wrap {
	text-align: center;
	margin-top: 24px;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

.inv-kingdom-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 32px;
	background: rgba(255, 255, 255, 0.06);
	color: var(--inv-text);
	border: 1px solid var(--inv-border);
	border-radius: var(--inv-radius-sm);
	font-family: 'Inter', sans-serif;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	cursor: pointer;
	transition: opacity 0.15s, transform 0.1s;
}

.inv-kingdom-load-more:hover {
	opacity: 0.88;
	transform: translateY(-1px);
}

.inv-kingdom-load-more:active {
	transform: translateY(0);
}

.inv-kingdom-load-more svg {
	width: 16px;
	height: 16px;
}

/* ── 5. Create Kingdom ── */
.inv-kingdom-create-section {
	margin-top: 32px;
	max-width: 520px;
	margin-left: auto;
	margin-right: auto;
}

.inv-kingdom-create-divider {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
}

.inv-kingdom-create-divider::before,
.inv-kingdom-create-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.25), transparent);
}

.inv-kingdom-create-divider span {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--inv-text-muted);
	text-transform: uppercase;
}

.inv-kingdom-create-title {
	font-family: 'Rajdhani', sans-serif;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--inv-gold);
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.inv-kingdom-create-title svg {
	width: 20px;
	height: 20px;
}

.inv-kingdom-create-desc {
	font-size: 0.82rem;
	color: var(--inv-text-muted);
	margin-bottom: 18px;
	line-height: 1.5;
}

.inv-kingdom-create-form {
	background: var(--inv-bg-2);
	border: 1px solid var(--inv-border);
	border-radius: var(--inv-radius);
	padding: 24px;
}

.inv-kingdom-create-form__row {
	margin-bottom: 16px;
}

.inv-kingdom-create-form__row label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	color: #c8cce8;
	letter-spacing: 0.04em;
	margin-bottom: 6px;
}

.inv-kingdom-create-form__row input,
.inv-kingdom-create-form__row textarea {
	width: 100%;
	padding: 12px 16px;
	background: #131d30;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--inv-radius-sm);
	color: var(--inv-text);
	font-size: 0.95rem;
	font-family: 'Inter', sans-serif;
	outline: none;
	transition: border-color 0.15s;
}

.inv-kingdom-create-form__row input:focus,
.inv-kingdom-create-form__row textarea:focus {
	border-color: var(--inv-gold);
}

.inv-kingdom-create-form__row input::placeholder,
.inv-kingdom-create-form__row textarea::placeholder {
	color: #505880;
}

.inv-kingdom-create-form__row textarea {
	resize: vertical;
	min-height: 60px;
}

.inv-kingdom-create-form__msg {
	padding: 14px 18px;
	border-radius: var(--inv-radius-sm);
	font-size: 0.88rem;
	line-height: 1.5;
	font-weight: 500;
	margin-bottom: 12px;
}

.inv-kingdom-create-form__msg--success {
	background: rgba(34, 197, 94, 0.08);
	border: 1px solid rgba(34, 197, 94, 0.3);
	color: #86efac;
}

.inv-kingdom-create-form__msg--error {
	background: rgba(239, 68, 68, 0.08);
	border: 1px solid rgba(239, 68, 68, 0.3);
	color: #fca5a5;
}

.inv-kingdom-create-form__hint {
	font-size: 0.72rem;
	color: var(--inv-text-muted);
	margin: 0 0 8px;
	line-height: 1.4;
}

.inv-required {
	color: var(--inv-error);
}

/* Upload zones */
.inv-kingdom-upload-row {
	display: flex;
	gap: 12px;
}

.inv-kingdom-upload-zone {
	position: relative;
	width: 140px;
	height: 140px;
	border: 2px dashed var(--inv-border);
	border-radius: var(--inv-radius);
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
	background: var(--inv-bg-2);
}

.inv-kingdom-upload-zone:hover {
	border-color: var(--inv-gold);
	background: var(--inv-gold-dim);
	box-shadow: 0 0 20px rgba(245, 158, 11, 0.08);
}

.inv-kingdom-upload-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.inv-kingdom-upload-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	gap: 8px;
	color: var(--inv-text-muted);
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	pointer-events: none;
}

.inv-kingdom-upload-placeholder svg {
	width: 22px;
	height: 22px;
	opacity: 0.5;
}

.inv-kingdom-upload-placeholder img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ── 6. Kingdom Overview — glassmorphism ── */
.inv-kingdom-overview {
	position: relative;
	z-index: 1;
	background: rgba(17, 24, 39, 0.7);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--inv-radius);
	overflow: hidden;
	margin: 0 20px 20px;
	max-width: 1200px;
	animation: inv-fadeInUp 0.5s ease both;
}

@media (min-width: 1240px) {
	.inv-kingdom-overview { margin: 0 auto 20px; }
}

/* Banner */
.inv-kingdom-banner {
	position: relative;
	background:
		radial-gradient(ellipse at 50% 0%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
		var(--inv-bg-2);
	padding: 36px 32px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	overflow: hidden;
}

/* Banner dots */
.inv-kingdom-banner::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: radial-gradient(circle, rgba(245, 158, 11, 0.06) 1px, transparent 1px);
	background-size: 32px 32px;
	pointer-events: none;
}

/* Banner glow */
.inv-kingdom-banner::after {
	content: '';
	position: absolute;
	top: -40px;
	right: -40px;
	width: 200px;
	height: 200px;
	background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
	pointer-events: none;
	animation: inv-glowPulse 4s ease-in-out infinite;
}

.inv-kingdom-banner__name {
	font-family: 'Rajdhani', sans-serif;
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	font-weight: 700;
	color: var(--inv-text);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0;
	position: relative;
	z-index: 1;
	background: linear-gradient(135deg, #f59e0b, #fbbf24, #f59e0b);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.inv-kingdom-banner__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	position: relative;
	z-index: 1;
}

.inv-kingdom-banner__meta span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.75rem;
	color: var(--inv-text-muted);
	background: rgba(255, 255, 255, 0.04);
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid var(--inv-border);
}

.inv-kingdom-banner__meta svg {
	width: 13px;
	height: 13px;
}

/* Role badge */
.inv-kingdom-banner__role {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 4px 12px;
	border-radius: 20px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.inv-kingdom-banner__role--leader {
	color: var(--inv-gold);
	background: var(--inv-gold-dim);
	border: 1px solid rgba(245, 158, 11, 0.25);
	animation: inv-pulseRing 3s ease-in-out infinite;
}

.inv-kingdom-banner__role--officer {
	color: #60a5fa;
	background: rgba(96, 165, 250, 0.1);
	border: 1px solid rgba(96, 165, 250, 0.2);
}

.inv-kingdom-banner__role--member {
	color: var(--inv-text-muted);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--inv-border);
}

/* Banner actions */
.inv-kingdom-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 4px;
	position: relative;
	z-index: 1;
}

/* Switch kingdom box */
.inv-kingdom-switch-box {
	padding: 24px 28px;
	border-top: 1px solid var(--inv-border);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.inv-kingdom-switch-box p {
	font-size: 0.82rem;
	color: var(--inv-text-muted);
	margin: 0;
	line-height: 1.5;
}

/* Switch kingdom grid */
.inv-kingdom-switch-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
}

/* Switch kingdom card — mini version of kingdom card */
.inv-kingdom-switch-card {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background: rgba(17, 24, 39, 0.7);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-top: 3px solid var(--inv-gold);
	border-radius: var(--inv-radius-sm);
	color: var(--inv-text);
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
	white-space: nowrap;
}

.inv-kingdom-switch-card svg {
	width: 14px;
	height: 14px;
	color: var(--inv-gold);
	flex-shrink: 0;
}

.inv-kingdom-switch-card:hover {
	border-color: rgba(245, 158, 11, 0.4);
	transform: translateY(-3px);
	box-shadow: 0 6px 24px rgba(245, 158, 11, 0.1);
}

/* ── 7. Pending Requests ── */
.inv-kingdom-requests {
	position: relative;
	z-index: 1;
	padding: 0 20px 20px;
	max-width: 1200px;
	margin: 0 auto;
}

.inv-kingdom-request-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	background: rgba(17, 24, 39, 0.7);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid var(--inv-border);
	border-radius: 10px;
	margin-bottom: 10px;
	transition: border-color 0.2s;
}

.inv-kingdom-request-item:hover {
	border-color: rgba(245, 158, 11, 0.3);
}

.inv-kingdom-request-item__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--inv-bg-3);
	border: 1px solid var(--inv-border);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--inv-text-dim);
	font-size: 0.75rem;
	font-weight: 600;
}

.inv-kingdom-request-item__info {
	flex: 1;
	min-width: 0;
}

.inv-kingdom-request-item__info strong {
	display: block;
	font-size: 0.9rem;
	color: var(--inv-text);
	font-weight: 600;
}

.inv-kingdom-request-item__info span {
	font-size: 0.75rem;
	color: var(--inv-text-muted);
}

.inv-kingdom-request-item__actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

/* ── 8. Claims Review ── */
.inv-kingdom-claims-review {
	position: relative;
	z-index: 1;
	padding: 0 20px 20px;
	max-width: 1200px;
	margin: 0 auto;
}

.inv-kingdom-claim-item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 16px;
	background: rgba(17, 24, 39, 0.7);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid var(--inv-border);
	border-radius: 10px;
	margin-bottom: 12px;
	transition: border-color 0.2s;
}

.inv-kingdom-claim-item:hover {
	border-color: rgba(245, 158, 11, 0.3);
}

.inv-kingdom-claim-item__thumb {
	width: 72px;
	height: 72px;
	border-radius: 8px;
	background: var(--inv-bg-3);
	border: 1px solid var(--inv-border);
	flex-shrink: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.inv-kingdom-claim-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.inv-kingdom-claim-item__info {
	flex: 1;
	min-width: 0;
}

.inv-kingdom-claim-item__info strong {
	display: block;
	font-size: 0.9rem;
	color: var(--inv-text);
	font-weight: 600;
	margin-bottom: 4px;
}

.inv-kingdom-claim-item__info p {
	font-size: 0.8rem;
	color: var(--inv-text-muted);
	margin: 0;
	line-height: 1.5;
}

.inv-kingdom-claim-item__actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
	align-self: center;
}

/* ── 9. Leader Panel ── */
.inv-kingdom-panel {
	position: relative;
	z-index: 1;
	padding: 0 20px 20px;
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.inv-kingdom-panel__card {
	position: relative;
	background: var(--inv-bg-2);
	border: 1px solid var(--inv-border);
	border-top: 3px solid var(--inv-gold);
	border-radius: var(--inv-radius);
	padding: 28px;
	overflow: hidden;
}

.inv-kingdom-panel__title {
	font-family: 'Rajdhani', sans-serif;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--inv-text);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
}

.inv-kingdom-panel__title svg {
	width: 18px;
	height: 18px;
	color: var(--inv-gold);
	flex-shrink: 0;
}

/* Form grid */
.inv-kingdom-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 20px;
}

.inv-kingdom-form-grid .full-width {
	grid-column: 1 / -1;
}

.inv-kingdom-form-label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	color: #c8cce8;
	letter-spacing: 0.04em;
	margin-bottom: 6px;
}

.inv-kingdom-form-input,
.inv-kingdom-panel__card input[type="text"],
.inv-kingdom-panel__card input[type="number"],
.inv-kingdom-panel__card input[type="url"],
.inv-kingdom-panel__card input[type="datetime-local"],
.inv-kingdom-panel__card textarea,
.inv-kingdom-panel__card select {
	width: 100%;
	padding: 12px 16px;
	background: #131d30;
	color: var(--inv-text);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--inv-radius-sm);
	font-family: 'Inter', sans-serif;
	font-size: 0.95rem;
	outline: none;
	transition: border-color 0.15s;
	box-sizing: border-box;
}

.inv-kingdom-form-input::placeholder,
.inv-kingdom-panel__card input::placeholder,
.inv-kingdom-panel__card textarea::placeholder {
	color: #505880;
}

.inv-kingdom-form-input:focus,
.inv-kingdom-panel__card input:focus,
.inv-kingdom-panel__card textarea:focus,
.inv-kingdom-panel__card select:focus {
	outline: none;
	border-color: var(--inv-gold);
}

.inv-kingdom-panel__card textarea {
	resize: vertical;
	min-height: 80px;
}

.inv-kingdom-panel__card select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7494' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
}

/* Tier row */
.inv-kingdom-tier-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: flex-end;
}

.inv-kingdom-tier-row > * {
	flex: 1;
	min-width: 120px;
}

/* Form actions */
.inv-kingdom-form-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	padding-top: 16px;
	border-top: 1px solid var(--inv-border);
	margin-top: 8px;
}

/* Form messages */
.inv-kingdom-form-msg {
	font-size: 0.88rem;
	padding: 14px 18px;
	border-radius: var(--inv-radius-sm);
	margin-top: 14px;
	line-height: 1.5;
	font-weight: 500;
}

.inv-kingdom-form-msg--success {
	color: #86efac;
	background: rgba(34, 197, 94, 0.08);
	border: 1px solid rgba(34, 197, 94, 0.3);
}

.inv-kingdom-form-msg--error {
	color: #fca5a5;
	background: rgba(239, 68, 68, 0.08);
	border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ── 10. Member Management Table ── */
.inv-kingdom-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}

.inv-kingdom-table thead {
	background: rgba(255, 255, 255, 0.04);
}

.inv-kingdom-table th {
	padding: 10px 14px;
	font-size: 0.65rem;
	font-weight: 700;
	color: var(--inv-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	text-align: left;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inv-kingdom-table td {
	padding: 12px 14px;
	color: var(--inv-text);
	vertical-align: middle;
	border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.inv-kingdom-table tr:last-child td {
	border-bottom: none;
}

.inv-kingdom-table tbody tr {
	transition: background 0.15s;
}

.inv-kingdom-table tbody tr:hover {
	background: rgba(245, 158, 11, 0.04);
}

.inv-kingdom-table__role--leader {
	color: var(--inv-gold);
	font-weight: 600;
}

.inv-kingdom-table__role--officer {
	color: #60a5fa;
	font-weight: 600;
}

.inv-kingdom-table__role--member {
	color: var(--inv-text-muted);
}

/* ── 11. Rankings ── */
.inv-kingdom-rankings {
	position: relative;
	z-index: 1;
	padding: 0 20px 20px;
	max-width: 1200px;
	margin: 0 auto;
}

.inv-kingdom-rank-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.inv-kingdom-rank-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 18px;
	background: var(--inv-bg-2);
	border: 1px solid var(--inv-border);
	border-radius: var(--inv-radius-sm);
	border-left: 3px solid transparent;
	transition: border-color 0.2s, transform 0.15s;
}

.inv-kingdom-rank-item:hover {
	border-color: rgba(245, 158, 11, 0.25);
	border-left-color: rgba(245, 158, 11, 0.25);
	transform: translateY(-2px);
}

/* Podium — top 3 */
.inv-kingdom-rank-item--podium:nth-child(1) {
	background: linear-gradient(90deg, rgba(245, 158, 11, 0.08) 0%, var(--inv-bg-2) 60%);
	border-left-color: var(--inv-gold);
	box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12);
}

.inv-kingdom-rank-item--podium:nth-child(2) {
	background: linear-gradient(90deg, rgba(148, 163, 184, 0.06) 0%, var(--inv-bg-2) 60%);
	border-left-color: #94a3b8;
	box-shadow: 0 4px 16px rgba(148, 163, 184, 0.08);
}

.inv-kingdom-rank-item--podium:nth-child(3) {
	background: linear-gradient(90deg, rgba(205, 127, 50, 0.06) 0%, var(--inv-bg-2) 60%);
	border-left-color: #cd7f32;
	box-shadow: 0 4px 16px rgba(205, 127, 50, 0.08);
}

.inv-kingdom-rank-item__pos {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--inv-text-dim);
	flex-shrink: 0;
	border-radius: 50%;
}

.inv-kingdom-rank-item--podium:nth-child(1) .inv-kingdom-rank-item__pos {
	color: var(--inv-gold);
	background: var(--inv-gold-dim);
	border: 2px solid var(--inv-gold);
	animation: inv-pulseRing 3s ease-in-out infinite;
}

.inv-kingdom-rank-item--podium:nth-child(2) .inv-kingdom-rank-item__pos {
	color: #94a3b8;
	background: rgba(148, 163, 184, 0.1);
	border: 2px solid #94a3b8;
}

.inv-kingdom-rank-item--podium:nth-child(3) .inv-kingdom-rank-item__pos {
	color: #cd7f32;
	background: rgba(205, 127, 50, 0.1);
	border: 2px solid #cd7f32;
}

.inv-kingdom-rank-item__name {
	flex: 1;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--inv-text);
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.inv-kingdom-rank-item__role {
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 3px 10px;
	border-radius: 20px;
	flex-shrink: 0;
}

.inv-kingdom-rank-item__glory {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--inv-gold);
	flex-shrink: 0;
	min-width: 60px;
	text-align: right;
}

/* ── 12. Section Headers ── */
.inv-kingdom-section-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 20px;
	margin-bottom: 20px;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

.inv-kingdom-section-header svg {
	width: 20px;
	height: 20px;
	color: var(--inv-gold);
	flex-shrink: 0;
}

.inv-kingdom-section-header h3 {
	font-family: 'Rajdhani', sans-serif;
	font-size: clamp(1rem, 2vw, 1.2rem);
	font-weight: 700;
	color: var(--inv-text);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0;
}

/* Separator line after section header */
.inv-kingdom-section-header + .inv-glory-separator,
.inv-kingdom-section-header::after {
	content: '';
	display: block;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.25), transparent);
	max-width: 200px;
}

.inv-kingdom-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 8px;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
}

.inv-kingdom-badge--pending {
	background: var(--inv-gold);
	color: var(--inv-bg);
}

.inv-kingdom-badge--claims {
	background: var(--inv-error);
	color: #fff;
}

/* ── 13. Action Buttons — glory claims style ── */

/* Base action button */
.inv-kingdom-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	border-radius: 8px;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.inv-kingdom-action-btn svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

.inv-kingdom-action-btn:focus-visible {
	outline: 2px solid var(--inv-gold);
	outline-offset: 2px;
}

.inv-kingdom-action-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

/* Approve — green fill */
.inv-kingdom-action-btn--approve {
	background: rgba(34, 197, 94, 0.15);
	border: 1px solid rgba(34, 197, 94, 0.4);
	color: #4ade80;
}

.inv-kingdom-action-btn--approve:hover {
	background: #22c55e;
	border-color: #22c55e;
	color: #fff;
	box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

/* Reject — red fill */
.inv-kingdom-action-btn--reject {
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid rgba(239, 68, 68, 0.4);
	color: #f87171;
}

.inv-kingdom-action-btn--reject:hover {
	background: #ef4444;
	border-color: #ef4444;
	color: #fff;
	box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

/* Promote — blue fill */
.inv-kingdom-action-btn--promote {
	background: rgba(96, 165, 250, 0.15);
	border: 1px solid rgba(96, 165, 250, 0.4);
	color: #60a5fa;
}

.inv-kingdom-action-btn--promote:hover {
	background: #3b82f6;
	border-color: #3b82f6;
	color: #fff;
	box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

/* Demote — muted fill */
.inv-kingdom-action-btn--demote {
	background: rgba(107, 116, 148, 0.1);
	border: 1px solid rgba(107, 116, 148, 0.3);
	color: var(--inv-text-muted);
}

.inv-kingdom-action-btn--demote:hover {
	background: rgba(107, 116, 148, 0.25);
	border-color: var(--inv-text-muted);
	color: var(--inv-text);
}

/* Remove — red fill */
.inv-kingdom-action-btn--remove {
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid rgba(239, 68, 68, 0.4);
	color: #f87171;
}

.inv-kingdom-action-btn--remove:hover {
	background: #ef4444;
	border-color: #ef4444;
	color: #fff;
	box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

/* ── 14. Generic Buttons (inv-btn reuse) ── */
.inv-kingdom-wrap .inv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 24px;
	border: none;
	border-radius: var(--inv-radius-sm);
	font-family: 'Inter', sans-serif;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	cursor: pointer;
	transition: opacity 0.15s, transform 0.1s;
	text-decoration: none;
}

.inv-kingdom-wrap .inv-btn:hover {
	opacity: 0.88;
	transform: translateY(-1px);
}

.inv-kingdom-wrap .inv-btn:active {
	transform: translateY(0);
}

.inv-kingdom-wrap .inv-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.inv-kingdom-wrap .inv-btn--primary {
	background: var(--inv-gold);
	color: #000;
}

.inv-kingdom-wrap .inv-btn--secondary {
	background: rgba(255, 255, 255, 0.06);
	color: var(--inv-text);
	border: 1px solid var(--inv-border);
}

.inv-kingdom-wrap .inv-btn--danger {
	background: rgba(239, 68, 68, 0.15);
	color: #f87171;
	border: 1px solid rgba(239, 68, 68, 0.4);
}

.inv-kingdom-wrap .inv-btn--danger:hover {
	background: #ef4444;
	color: #fff;
}

.inv-kingdom-wrap .inv-btn--full {
	width: 100%;
}

/* ── 15. Decorative separator ── */
.inv-kingdom-separator {
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.25), transparent);
	max-width: 200px;
	margin: 0 auto;
}

/* ── 16. Desktop spacing ── */
@media (min-width: 769px) {
	.inv-kingdom-select,
	.inv-kingdom-requests,
	.inv-kingdom-claims-review,
	.inv-kingdom-panel,
	.inv-kingdom-rankings {
		padding-left: 2rem;
		padding-right: 2rem;
	}

	.inv-kingdom-section-header {
		padding: 0 2rem;
	}
}

/* ── 17. Responsive ── */
@media (max-width: 768px) {

	.inv-kingdom-tabs {
		padding: 0 0.75rem;
	}

	.inv-kingdom-tab {
		font-size: 0.72rem;
		padding: 12px 16px;
		gap: 4px;
	}

	.inv-kingdom-tab svg {
		width: 14px;
		height: 14px;
	}

	/* Kingdom grid — single column */
	.inv-kingdom-grid {
		grid-template-columns: 1fr;
	}

	/* Overview banner */
	.inv-kingdom-overview {
		margin: 0 12px 16px;
		border-radius: var(--inv-radius-sm);
	}

	.inv-kingdom-banner {
		padding: 2rem 1.25rem;
	}

	.inv-kingdom-banner__meta {
		gap: 8px;
	}

	.inv-kingdom-banner__actions {
		flex-direction: column;
	}

	.inv-kingdom-switch-box {
		padding: 16px 18px;
	}

	.inv-kingdom-switch-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 8px;
	}

	.inv-kingdom-switch-card {
		padding: 10px 12px;
		font-size: 0.75rem;
	}

	/* Form grid — single column */
	.inv-kingdom-form-grid {
		grid-template-columns: 1fr;
	}

	/* Tier row stacking */
	.inv-kingdom-tier-row {
		flex-direction: column;
	}

	.inv-kingdom-tier-row > * {
		min-width: 100%;
	}

	/* Sections padding */
	.inv-kingdom-select,
	.inv-kingdom-requests,
	.inv-kingdom-claims-review,
	.inv-kingdom-panel,
	.inv-kingdom-rankings {
		padding-left: 12px;
		padding-right: 12px;
	}

	.inv-kingdom-section-header {
		padding: 0 12px;
	}

	/* Request items */
	.inv-kingdom-request-item {
		flex-wrap: wrap;
		padding: 12px 14px;
	}

	.inv-kingdom-request-item__actions {
		width: 100%;
		justify-content: flex-end;
		margin-top: 4px;
	}

	/* Claim items */
	.inv-kingdom-claim-item {
		flex-wrap: wrap;
	}

	.inv-kingdom-claim-item__thumb {
		width: 56px;
		height: 56px;
	}

	.inv-kingdom-claim-item__actions {
		width: 100%;
		justify-content: flex-end;
		margin-top: 4px;
	}

	/* Table — horizontal scroll */
	.inv-kingdom-table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}

	.inv-kingdom-table thead,
	.inv-kingdom-table tbody,
	.inv-kingdom-table tr,
	.inv-kingdom-table th,
	.inv-kingdom-table td {
		display: revert;
	}

	/* Rankings */
	.inv-kingdom-rank-item {
		gap: 10px;
		padding: 10px 14px;
	}

	.inv-kingdom-rank-item__glory {
		min-width: auto;
	}

	/* Form actions */
	.inv-kingdom-form-actions {
		flex-direction: column;
	}

	.inv-kingdom-form-actions button,
	.inv-kingdom-form-actions .inv-btn {
		width: 100%;
		justify-content: center;
	}

	/* Panel cards */
	.inv-kingdom-panel__card {
		padding: 18px;
	}
}

/* ── 18. Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
	.inv-kingdom-card,
	.inv-kingdom-auth,
	.inv-kingdom-pending,
	.inv-kingdom-overview {
		animation: none;
	}

	.inv-kingdom-card:hover,
	.inv-kingdom-rank-item:hover,
	.inv-kingdom-load-more:hover {
		transform: none;
	}

	.inv-kingdom-badge--pending {
		animation: none;
	}

	.inv-kingdom-card__join,
	.inv-kingdom-auth svg,
	.inv-kingdom-pending svg,
	.inv-kingdom-banner::after,
	.inv-kingdom-banner__role--leader,
	.inv-kingdom-rank-item--podium:nth-child(1) .inv-kingdom-rank-item__pos {
		animation: none;
	}
}
