/* Theme-independent application overrides. */

.chart-legend {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.45rem 0.7rem;
    color: var(--rz-text-color, var(--ci-text-primary, #1f2937));
    font-family: var(--rz-text-font-family, var(--ci-font-body, sans-serif));
    font-size: 0.78rem;
    line-height: 1.25;
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--rz-border-color, rgba(127, 127, 127, 0.25));
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    background: var(--rz-base-100, rgba(127, 127, 127, 0.1));
}

.chart-legend-swatch {
    width: 0.68rem;
    height: 0.68rem;
    flex: 0 0 0.68rem;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.chart-legend-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Theme-independent Radzen dialog header alignment. */
.rz-dialog-titlebar {
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    min-height: 64px !important;
    padding: 0 1.5rem !important;
}

.rz-dialog-titlebar .rz-dialog-title {
    position: absolute;
    left: 50%;
    width: calc(100% - 7rem);
    margin: 0;
    text-align: center !important;
    line-height: 1 !important;
    transform: translateX(-50%);
    pointer-events: none;
}

.rz-dialog-titlebar .rz-dialog-titlebar-close {
    position: absolute;
    top: 50%;
    right: 1.5rem;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    margin: 0 !important;
    line-height: 1 !important;
    transform: translateY(-50%);
}

.rz-dialog-titlebar .rz-dialog-titlebar-close .rzi,
.rz-dialog-titlebar .rz-dialog-titlebar-close .rz-icon {
    line-height: 1 !important;
}

@keyframes app-pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(0, 230, 118, 0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 16px rgba(0, 230, 118, 0.8); }
}

@keyframes app-fade-in-up {
    0% { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes app-slide-in-left {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes app-border-glow {
    0%, 100% { border-color: var(--ci-border, var(--rz-border-color, rgba(127, 127, 127, 0.25))); }
    50% { border-color: var(--ci-border-hover, color-mix(in srgb, var(--rz-primary, #00bcd4) 45%, transparent)); }
}

@keyframes app-radar-ping {
    0% { transform: scale(0.5); opacity: 1; border-color: var(--ci-cyan, var(--rz-primary, #00bcd4)); }
    100% { transform: scale(1.5); opacity: 0; border-color: transparent; }
}

@keyframes app-glitch-text {
    0%, 95%, 100% { transform: translateX(0); }
    96% { transform: translateX(-4px); }
    97% { transform: translateX(4px); }
    98% { transform: translateX(-2px); }
    99% { transform: translateX(2px); }
}

.animate-in {
    animation: app-fade-in-up 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-in-1 { animation-delay: 50ms; }
.animate-in-2 { animation-delay: 100ms; }
.animate-in-3 { animation-delay: 150ms; }
.animate-in-4 { animation-delay: 200ms; }
.animate-in-5 { animation-delay: 250ms; }
.animate-in-6 { animation-delay: 300ms; }
.animate-in-7 { animation-delay: 350ms; }
.animate-in-8 { animation-delay: 400ms; }

.animate-slide-left {
    animation: app-slide-in-left 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-heading {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif)) !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    color: var(--ci-text-primary, var(--rz-text-title-color, var(--rz-text-color, #fff))) !important;
    position: relative;
    display: inline-block;
}

.page-heading::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--ci-cyan, var(--rz-primary, #00bcd4)), transparent);
    border-radius: 2px;
}

.page-subtitle {
    display: inline-flex !important;
    align-items: center;
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 0.8rem !important;
    letter-spacing: 3px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    text-transform: uppercase !important;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af))) !important;
}

.header-welcome {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    letter-spacing: 1px !important;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af))) !important;
}

.header-welcome strong {
    color: var(--ci-cyan, var(--rz-primary, #00bcd4)) !important;
    font-weight: 600;
}

.header-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ci-success, var(--rz-success, #00e676));
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.5);
    margin-right: 8px;
    animation: app-pulse-dot 2s ease-in-out infinite;
}

.dashboard-hero {
    position: relative;
    padding: 2rem 0 1rem;
}

.dashboard-title {
    font-family: var(--ci-font-display, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 2.2rem !important;
    font-weight: 700 !important;
    letter-spacing: 4px !important;
    text-transform: uppercase;
    color: var(--ci-text-primary, var(--rz-text-title-color, var(--rz-text-color, #fff))) !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    text-shadow: 0 0 30px var(--ci-cyan-glow, color-mix(in srgb, var(--rz-primary, #00bcd4) 25%, transparent));
}

.dashboard-title span {
    color: var(--ci-cyan, var(--rz-primary, #00bcd4));
}

.dashboard-stat-count {
    font-family: var(--ci-font-display, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    color: var(--ci-gold, var(--rz-warning, #ffab00)) !important;
    text-shadow: 0 0 20px var(--ci-gold-glow, rgba(255, 171, 0, 0.2));
    display: inline-block;
}

.dashboard-stat-label {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 0.8rem !important;
    letter-spacing: 3px !important;
    text-transform: uppercase;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af))) !important;
    margin-left: 0.75rem;
}

.dashboard-cards-container,
.settings-section {
    background: var(--ci-glass, var(--rz-card-background-color, var(--rz-base-background-color, rgba(127, 127, 127, 0.08)))) !important;
    border: 1px solid var(--ci-border, var(--rz-border-color, rgba(127, 127, 127, 0.25)));
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.dashboard-cards-container {
    margin-top: 1.5rem;
    padding: 1.5rem;
}

.loading-radar {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 2rem auto;
}

.loading-radar::before,
.loading-radar::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: app-radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.loading-radar::before {
    border: 2px solid var(--ci-border, var(--rz-border-color, rgba(127, 127, 127, 0.25)));
}

.loading-radar::after {
    border: 2px solid var(--ci-cyan-dim, var(--rz-primary, #0097a7));
    animation-delay: 0.5s;
}

.changelog-card {
    background: var(--ci-glass, var(--rz-card-background-color, var(--rz-base-background-color, rgba(127, 127, 127, 0.08)))) !important;
    border: 1px solid var(--ci-border, var(--rz-border-color, rgba(127, 127, 127, 0.25))) !important;
    border-radius: 8px !important;
    padding: 1.5rem 2rem !important;
    margin-bottom: 1rem !important;
    position: relative;
    overflow: hidden;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.changelog-card:hover {
    border-color: var(--ci-border-hover, color-mix(in srgb, var(--rz-primary, #00bcd4) 45%, transparent)) !important;
    transform: translateX(4px);
}

.changelog-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--ci-cyan, var(--rz-primary, #00bcd4)), var(--ci-cyan-dim, var(--rz-primary, #0097a7)));
    border-radius: 0 2px 2px 0;
}

.changelog-card h1 {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    color: var(--ci-cyan, var(--rz-primary, #00bcd4)) !important;
    margin-top: 0 !important;
}

.changelog-card li {
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af)));
    font-family: var(--ci-font-body, var(--rz-text-font-family, sans-serif));
    line-height: 1.8;
    font-size: 0.85rem;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-family: var(--ci-font-display, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 6rem !important;
    font-weight: 900 !important;
    color: var(--ci-danger, var(--rz-danger, #ff1744)) !important;
    text-shadow: 0 0 40px var(--ci-danger-glow, color-mix(in srgb, var(--rz-danger, #ff1744) 25%, transparent));
    line-height: 1;
    margin-bottom: 1rem;
    animation: app-glitch-text 3s ease-in-out infinite;
    position: relative;
}

.error-title {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    letter-spacing: 4px !important;
    text-transform: uppercase;
    color: var(--ci-text-primary, var(--rz-text-title-color, var(--rz-text-color, #fff))) !important;
    margin-bottom: 1rem;
}

.error-message {
    font-family: var(--ci-font-body, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 1rem !important;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af))) !important;
    max-width: 500px;
    line-height: 1.6;
}

.error-decor-line {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ci-danger, var(--rz-danger, #ff1744)), transparent);
    margin: 1.5rem auto;
    border-radius: 1px;
}

.not-found-container {
    text-align: center;
    padding: 5rem 2rem;
}

.not-found-code {
    font-family: var(--ci-font-display, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 8rem !important;
    font-weight: 900 !important;
    color: var(--ci-text-muted, var(--rz-text-tertiary-color, #6b7280)) !important;
    text-shadow: 0 0 30px rgba(74, 90, 120, 0.3);
    line-height: 1;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}

.not-found-title {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 6px !important;
    text-transform: uppercase;
    color: var(--ci-text-primary, var(--rz-text-title-color, var(--rz-text-color, #fff))) !important;
}

.not-found-subtitle {
    font-family: var(--ci-font-body, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 1rem !important;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af))) !important;
}

.iframe-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px);
    border: 1px solid var(--ci-border, var(--rz-border-color, rgba(127, 127, 127, 0.25)));
    border-radius: 8px;
    overflow: hidden;
    background: var(--ci-surface, var(--rz-base-background-color, rgba(127, 127, 127, 0.08)));
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.iframe-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ci-cyan, var(--rz-primary, #00bcd4)), transparent);
    z-index: 10;
}

.wave-decoration {
    position: relative;
    overflow: hidden;
}

.wave-decoration::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -10%;
    right: -10%;
    height: 60px;
    background:
        radial-gradient(ellipse at 25% 100%, color-mix(in srgb, var(--rz-primary, #00bcd4) 10%, transparent) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 100%, rgba(255, 171, 0, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.clan-header {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ci-border, var(--rz-border-color, rgba(127, 127, 127, 0.25)));
    margin-bottom: 1.5rem;
}

.clan-name {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    color: var(--ci-text-primary, var(--rz-text-title-color, var(--rz-text-color, #fff))) !important;
    letter-spacing: 1px !important;
}

.clan-name .clan-tag {
    color: var(--ci-cyan, var(--rz-primary, #00bcd4));
    font-family: var(--ci-font-display, var(--rz-text-font-family, sans-serif));
    font-size: 1rem;
}

.clan-member-count {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 0.8rem !important;
    letter-spacing: 2px !important;
    text-transform: uppercase;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af))) !important;
}

.role-commander { color: var(--ci-gold, var(--rz-warning, #ffab00)) !important; }
.role-executive { color: var(--ci-cyan, var(--rz-primary, #00bcd4)) !important; }
.role-recruitment { color: var(--ci-success, var(--rz-success, #00e676)) !important; }
.role-officer { color: var(--ci-info, var(--rz-info, #448aff)) !important; }
.role-private { color: var(--ci-text-secondary, var(--rz-text-secondary-color, #9ca3af)) !important; }

.settings-section {
    padding: 1.5rem 2rem;
}

.dashboard-cards-container::before,
.settings-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ci-cyan, var(--rz-primary, #00bcd4)), var(--ci-gold, var(--rz-warning, #ffab00)), var(--ci-cyan, var(--rz-primary, #00bcd4)));
}

.settings-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.settings-section-title,
.settings-label {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif)) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
}

.settings-section-title {
    font-size: 0.85rem !important;
    letter-spacing: 3px !important;
    color: var(--ci-text-primary, var(--rz-text-title-color, var(--rz-text-color, #fff))) !important;
    margin: 0 !important;
}

.settings-label {
    font-size: 0.75rem !important;
    letter-spacing: 2px !important;
    color: var(--ci-cyan, var(--rz-primary, #00bcd4)) !important;
    margin: 0 0 0.25rem 0 !important;
}

.settings-description {
    font-family: var(--ci-font-body, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 0.85rem !important;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af))) !important;
    margin: 0 0 1.25rem 0 !important;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.theme-card {
    background: var(--ci-surface, var(--rz-card-background-color, var(--rz-base-background-color, rgba(127, 127, 127, 0.08))));
    border: 1px solid var(--ci-border, var(--rz-border-color, rgba(127, 127, 127, 0.25)));
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.theme-card:hover {
    border-color: var(--ci-border-hover, color-mix(in srgb, var(--rz-primary, #00bcd4) 45%, transparent));
    box-shadow: var(--ci-shadow-md, 0 4px 20px rgba(0, 0, 0, 0.18));
    transform: translateY(-3px);
}

.theme-card-active {
    border-color: var(--ci-cyan, var(--rz-primary, #00bcd4)) !important;
    box-shadow: var(--ci-shadow-lg, 0 8px 40px rgba(0, 0, 0, 0.22)), 0 0 20px color-mix(in srgb, var(--rz-primary, #00bcd4) 25%, transparent) !important;
}

.theme-card-active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--ci-cyan, var(--rz-primary, #00bcd4));
    box-shadow: 0 0 10px color-mix(in srgb, var(--rz-primary, #00bcd4) 35%, transparent);
}

.theme-card-preview {
    height: 80px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    overflow: hidden;
}

.theme-card-preview-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.theme-card-preview-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: 1rem;
}

.theme-card-body {
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--ci-border, var(--rz-border-color, rgba(127, 127, 127, 0.25)));
}

.theme-card-name {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    color: var(--ci-text-primary, var(--rz-text-title-color, var(--rz-text-color, #fff))) !important;
    margin: 0 !important;
}

.theme-card-desc {
    font-family: var(--ci-font-body, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 0.78rem !important;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af))) !important;
    margin: 0.25rem 0 0 0 !important;
    line-height: 1.4 !important;
}

.ci-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ci-border-hover, color-mix(in srgb, var(--rz-primary, #00bcd4) 35%, transparent)), transparent);
    border: none;
    margin: 1.5rem 0;
}

.ci-badge,
.ci-plan-pill {
    display: inline-flex;
    align-items: center;
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif));
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid;
}

.ci-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    line-height: 1.2;
}

.ci-plan-pill {
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    font-size: 0.58rem;
    letter-spacing: 1.7px;
}

.ci-badge-cyan,
.ci-plan-pill-premium {
    color: var(--ci-cyan, var(--rz-primary, #00bcd4));
    border-color: color-mix(in srgb, var(--rz-primary, #00bcd4) 35%, transparent);
    background: color-mix(in srgb, var(--rz-primary, #00bcd4) 10%, transparent);
}

.ci-badge-gold,
.ci-plan-pill-free {
    color: var(--ci-gold, var(--rz-warning, #ffab00));
    border-color: rgba(255, 171, 0, 0.35);
    background: rgba(255, 171, 0, 0.08);
}

.ci-badge-danger {
    color: var(--ci-danger, var(--rz-danger, #ff1744));
    border-color: color-mix(in srgb, var(--rz-danger, #ff1744) 35%, transparent);
    background: color-mix(in srgb, var(--rz-danger, #ff1744) 10%, transparent);
}

.premium-lock-shell {
    position: relative;
    min-height: 55vh;
}

.premium-lock-content {
    transition: filter 250ms cubic-bezier(0.4, 0, 0.2, 1), transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-lock-content-blurred {
    filter: blur(7px) saturate(0.7);
    transform: scale(0.995);
    pointer-events: none;
    user-select: none;
}

.premium-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.premium-lock-card {
    width: min(520px, 95%);
    padding: 1.25rem 1.25rem 1.4rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 171, 0, 0.38);
    background: color-mix(in srgb, var(--rz-base-background-color, #0d1525) 88%, transparent);
    backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: var(--ci-shadow-md, 0 4px 20px rgba(0, 0, 0, 0.28)), 0 0 24px rgba(255, 171, 0, 0.12);
}

.premium-lock-icon {
    font-size: 1.9rem;
    color: var(--ci-gold, var(--rz-warning, #ffab00));
}

.premium-lock-title {
    margin-top: 0.55rem;
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif));
    font-size: 1.05rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ci-text-primary, var(--rz-text-title-color, var(--rz-text-color, #fff)));
}

.premium-lock-subtitle {
    margin-top: 0.45rem;
    margin-bottom: 0.95rem;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af)));
    line-height: 1.45;
}

.premium-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid rgba(255, 171, 0, 0.35);
    border-radius: 8px;
    background: rgba(255, 171, 0, 0.08);
    padding: 0.75rem 0.9rem;
    box-shadow: 0 0 14px rgba(255, 171, 0, 0.12);
}

.premium-info-icon {
    color: var(--ci-gold, var(--rz-warning, #ffab00));
    margin-top: 2px;
}

.premium-info-title {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif));
    font-size: 0.78rem;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--ci-text-primary, var(--rz-text-title-color, var(--rz-text-color, #fff)));
}

.premium-info-subtitle {
    margin-top: 0.18rem;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af)));
    font-size: 0.83rem;
}

.premium-anon-text {
    filter: blur(4px);
    opacity: 0.9;
}

.billing-card {
    border: 1px solid var(--ci-border, var(--rz-border-color, rgba(127, 127, 127, 0.25)));
    background: var(--ci-glass, var(--rz-card-background-color, var(--rz-base-background-color, rgba(127, 127, 127, 0.08))));
}

.billing-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.84rem;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af)));
}

.billing-row strong {
    color: var(--ci-text-primary, var(--rz-text-color, #e5e7eb));
    font-weight: 600;
}

.text-cyan { color: var(--ci-cyan, var(--rz-primary, #00bcd4)) !important; }
.text-gold { color: var(--ci-gold, var(--rz-warning, #ffab00)) !important; }
.text-danger { color: var(--ci-danger, var(--rz-danger, #ff1744)) !important; }
.text-success { color: var(--ci-success, var(--rz-success, #00e676)) !important; }
.text-muted { color: var(--ci-text-muted, var(--rz-text-tertiary-color, #6b7280)) !important; }
.text-secondary { color: var(--ci-text-secondary, var(--rz-text-secondary-color, #9ca3af)) !important; }

.glow-cyan { text-shadow: 0 0 10px var(--ci-cyan-glow, color-mix(in srgb, var(--rz-primary, #00bcd4) 25%, transparent)) !important; }
.glow-gold { text-shadow: 0 0 10px var(--ci-gold-glow, rgba(255, 171, 0, 0.2)) !important; }

.font-display { font-family: var(--ci-font-display, var(--rz-text-font-family, sans-serif)) !important; }
.font-heading { font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif)) !important; }
.font-body { font-family: var(--ci-font-body, var(--rz-text-font-family, sans-serif)) !important; }

.border-glow {
    border: 1px solid var(--ci-border-hover, color-mix(in srgb, var(--rz-primary, #00bcd4) 45%, transparent));
    animation: app-border-glow 3s ease-in-out infinite;
}

.cb-clan-icon {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.cb-leaderboard-grid .rz-grid-table td:nth-child(3),
.cb-leaderboard-grid .rz-grid-table th:nth-child(3) {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.glass {
    background: var(--ci-glass, var(--rz-card-background-color, var(--rz-base-background-color, rgba(127, 127, 127, 0.08)))) !important;
    backdrop-filter: blur(var(--ci-glass-blur, 12px));
    -webkit-backdrop-filter: blur(var(--ci-glass-blur, 12px));
}

/* Theme-independent player lookup/details layout. */
.player-lookup-shell {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.billing-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(255, 171, 0, 0.3);
    border-radius: 8px;
    background: rgba(255, 171, 0, 0.08);
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af)));
    font-size: 0.8rem;
}

.lookup-search-card,
.lookup-grid-card,
.lookup-hero-card,
.lookup-chart-card,
.lookup-legend-card {
    border: 1px solid var(--ci-border, var(--rz-border-color, rgba(127, 127, 127, 0.25)));
    background: var(--ci-glass, var(--rz-card-background-color, var(--rz-base-background-color, rgba(127, 127, 127, 0.08))));
}

.lookup-hero-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(280px, 440px);
    gap: 1rem;
    align-items: stretch;
}

.lookup-hero-label,
.lookup-kpi-label,
.lookup-stat-label,
.lookup-chart-title,
.lookup-grid-count {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif));
    text-transform: uppercase;
}

.lookup-hero-label {
    font-size: 0.68rem;
    letter-spacing: 2px;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af)));
}

.lookup-player-name {
    font-family: var(--ci-font-display, var(--rz-text-font-family, sans-serif)) !important;
    font-size: 1.8rem !important;
    letter-spacing: 2px !important;
    color: var(--ci-text-primary, var(--rz-text-title-color, var(--rz-text-color, #fff))) !important;
    margin-top: 0.15rem;
}

.lookup-player-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lookup-player-badge {
    width: 34px;
    height: 34px;
    object-fit: contain;
    margin-top: 0.15rem;
}

.lookup-clan-achievements {
    margin-top: 0.75rem;
}

.lookup-player-sub {
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af)));
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.lookup-xpr-meter {
    margin-top: 0.95rem;
    border: 1px solid var(--ci-border-hover, color-mix(in srgb, var(--rz-primary, #00bcd4) 35%, transparent));
    border-radius: 10px;
    padding: 0.8rem 0.9rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--rz-primary, #00bcd4) 10%, transparent), rgba(115, 53, 204, 0.06));
}

.lookup-xpr-meter-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.lookup-xpr-tier {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif));
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.lookup-xpr-band {
    margin-top: 0.6rem;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--rz-text-color, #fff) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--rz-text-color, #fff) 18%, transparent);
    overflow: hidden;
}

.lookup-xpr-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 300ms ease;
}

.lookup-xpr-fill-bot { background: #930d0d; }
.lookup-xpr-fill-vbad { background: #cd3333; }
.lookup-xpr-fill-bad { background: #cc7a00; }
.lookup-xpr-fill-below { background: #ccb800; }
.lookup-xpr-fill-avg { background: #849b24; }
.lookup-xpr-fill-good { background: #4d7326; }
.lookup-xpr-fill-vgood { background: #399e3a; }
.lookup-xpr-fill-great { background: #3972c6; }
.lookup-xpr-fill-unicum { background: #793db6; }
.lookup-xpr-fill-sunicum { background: #401070; }

.lookup-xpr-value-row {
    margin-top: 0.55rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.lookup-xpr-value {
    font-family: var(--ci-font-display, var(--rz-text-font-family, sans-serif));
    font-size: 1.35rem;
    letter-spacing: 1px;
}

.lookup-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 0.65rem;
}

.lookup-kpi-card {
    border: 1px solid var(--ci-border-hover, color-mix(in srgb, var(--rz-primary, #00bcd4) 35%, transparent));
    border-radius: 8px;
    padding: 0.7rem 0.75rem;
    background: var(--ci-surface, var(--rz-base-background-color, rgba(127, 127, 127, 0.08)));
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lookup-kpi-label,
.lookup-stat-label {
    font-size: 0.62rem;
    letter-spacing: 1.8px;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af)));
}

.lookup-kpi-card strong,
.lookup-stat-value {
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif));
    font-size: 1rem;
    font-weight: 700;
    color: var(--ci-text-primary, var(--rz-text-color, #e5e7eb));
}

.lookup-env-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif));
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 1.7px;
    text-transform: uppercase;
    color: var(--ci-cyan, var(--rz-primary, #00bcd4));
    border: 1px solid color-mix(in srgb, var(--rz-primary, #00bcd4) 45%, transparent);
    background: color-mix(in srgb, var(--rz-primary, #00bcd4) 10%, transparent);
}

.lookup-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.lookup-summary-stat {
    border: 1px solid var(--ci-border, var(--rz-border-color, rgba(127, 127, 127, 0.25)));
    background: var(--ci-glass, var(--rz-card-background-color, var(--rz-base-background-color, rgba(127, 127, 127, 0.08))));
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lookup-chart-title {
    font-size: 0.72rem;
    letter-spacing: 2px;
    color: var(--ci-text-secondary, var(--rz-text-secondary-color, var(--rz-text-color, #9ca3af)));
}

.lookup-grid-toolbar {
    margin-bottom: 0.9rem;
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: end;
    flex-wrap: wrap;
}

.lookup-grid-count {
    font-size: 0.74rem;
    letter-spacing: 1.8px;
    color: var(--ci-cyan, var(--rz-primary, #00bcd4));
}

.lookup-xpr-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif));
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
}

.lookup-xpr-pill-bot { background: #930d0d; }
.lookup-xpr-pill-vbad { background: #cd3333; }
.lookup-xpr-pill-bad { background: #cc7a00; }
.lookup-xpr-pill-below { background: #ccb800; color: #1a1a1a; }
.lookup-xpr-pill-avg { background: #849b24; color: #0c1300; }
.lookup-xpr-pill-good { background: #4d7326; }
.lookup-xpr-pill-vgood { background: #399e3a; }
.lookup-xpr-pill-great { background: #3972c6; }
.lookup-xpr-pill-unicum { background: #793db6; }
.lookup-xpr-pill-sunicum { background: #401070; }

.lookup-xpr-legend {
    margin-top: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.lookup-legend-item {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.58rem;
    font-family: var(--ci-font-heading, var(--rz-text-font-family, sans-serif));
    font-size: 0.62rem;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: #fff;
}

.tier-bot { background: #930d0d; }
.tier-vbad { background: #cd3333; }
.tier-bad { background: #cc7a00; }
.tier-below { background: #ccb800; color: #1a1a1a; }
.tier-avg { background: #849b24; color: #101700; }
.tier-good { background: #4d7326; }
.tier-vgood { background: #399e3a; }
.tier-great { background: #3972c6; }
.tier-unicum { background: #793db6; }
.tier-sunicum { background: #401070; }

.text-bot { color: #930d0d; font-weight: 700; }
.text-vbad { color: #cd3333; font-weight: 700; }
.text-bad { color: #cc7a00; font-weight: 700; }
.text-below { color: #ccb800; font-weight: 700; }
.text-avg { color: #849b24; font-weight: 700; }
.text-good { color: #4d7326; font-weight: 700; }
.text-vgood { color: #4d7326; font-weight: 700; }
.text-great { color: #3972c6; font-weight: 700; }
.text-unicum { color: #793db6; font-weight: 700; }
.text-sunicum { color: #401070; font-weight: 700; }

@media (max-width: 1040px) {
    .lookup-hero-grid {
        grid-template-columns: 1fr;
    }

    .lookup-kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    .lookup-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .lookup-grid-toolbar {
        align-items: stretch;
    }

    .lookup-grid-count {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .chart-legend {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.45rem;
    }

    .chart-legend-item {
        width: 100%;
    }
}
