/**
 * NEXUS PREMIUM UI COMPONENT SYSTEM
 * High-fidelity semantic components inspired by top-tier marketplaces (Airbnb style).
 * Isolated from core styles to prevent regressions.
 */

:root {
    --nexus-premium-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    --nexus-premium-border: #dddddd;
    --nexus-premium-text-main: #919191f0;
    --nexus-premium-text-secondary: #717171;
}

svg {
    width: 16px;
    height: 16px;
}

/* SEMANTIC UTILITIES & INTEGRATIONS */
.nx-social-wa {
    color: #25D366 !important;
    border-color: rgba(37, 211, 102, 0.3) !important;
    padding: 10px;
    text-align: center;
}

.nx-social-wa:hover {
    background-color: rgba(37, 211, 102, 0.1) !important;
}

.nx-social-tg {
    color: #0088cc !important;
    border-color: rgba(0, 136, 204, 0.3) !important;
    padding: 10px;
    text-align: center;
}

.nx-social-tg:hover {
    background-color: rgba(0, 136, 204, 0.1) !important;
}

.nx-social-li {
    color: #0077b5 !important;
    border-color: rgba(0, 119, 181, 0.3) !important;
    padding: 10px;
    text-align: center;
}

.nx-social-li:hover {
    background-color: rgba(0, 119, 181, 0.1) !important;
}

/* 0. TIPPY PREMIUM THEME (NPSP v9.5) */
.tippy-box[data-theme~='nexus-premium'] {
    background-color: var(--bg-surface-glass);
    background: var(--bg-surface-glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    color: var(--text-main);
    box-shadow: var(--shadow-premium);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    padding: 6px 12px;
}

.tippy-box[data-theme~='nexus-premium'][data-placement^='top']>.tippy-arrow::before {
    border-top-color: var(--glass-border);
}

.tippy-box[data-theme~='nexus-premium'][data-placement^='bottom']>.tippy-arrow::before {
    border-bottom-color: var(--glass-border);
}

.tippy-box[data-theme~='nexus-premium'][data-placement^='left']>.tippy-arrow::before {
    border-left-color: var(--glass-border);
}

.tippy-box[data-theme~='nexus-premium'][data-placement^='right']>.tippy-arrow::before {
    border-right-color: var(--glass-border);
}

.nx-qr-card-large {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    padding: 5px;
    background: white;
}

/* LAYOUT & RESPONSIVE PROTOCOLS */
.nx-h-stack {
    display: flex;
    align-items: center;
}

.nx-v-stack {
    display: flex;
    flex-direction: column;
}

.nx-align-center {
    align-items: center;
}

.nx-justify-center {
    justify-content: center;
}

.nx-gap-xs {
    gap: 5px;
}

.nx-gap-sm {
    gap: 10px;
}

.nx-gap-md {
    gap: 15px;
}

.nx-gap-large {
    gap: 24px;
}

.flex-1 {
    flex: 1;
}

.nx-block {
    display: block;
}

.nx-text-dim {
    color: var(--nexus-premium-text-secondary);
}

/* ELITE SELECT PROTOCOL */
.nx-elite-select-container {
    position: relative;
    width: -webkit-fill-available;
    min-width: 250px;
}

.nx-elite-select-container.nx-elite-select-compact {
    width: auto;
    min-width: 0;
}

.nx-elite-select-wrapper {
    position: relative;
    width: 100%;
}

.nx-elite-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    min-width: 220px;
    width: max-content;
    max-width: 400px;
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    z-index: 10000;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding: 8px;
    background: hsl(0deg 0% 67.1% / 14%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(210%) !important;
    backdrop-filter: blur(60px) saturate(210%) !important;
}

.nx-elite-dropdown::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--bg-glass-heavy) !important;
    -webkit-backdrop-filter: blur(45px) saturate(210%);
    backdrop-filter: blur(45px) saturate(210%);
    border-radius: inherit;
    pointer-events: none;
}

.nx-elite-dropdown.is-visible {
    display: block !important;
    animation: nxFadeInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-color: var(--accent-secondary);
}

/* OVERFLOW SOVEREIGNTY: Prevent clipping in tables/cards (NPSP v9.5) */
.nx-elite-parent-visible {
    overflow: visible !important;
}

.nx-elite-option {
    font-size: 13px;
    padding: 7px 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 12px;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    margin-bottom: 2px;
    align-items: center;
}

.nx-elite-option:hover {
    background: var(--bg-accent-dim);
    color: var(--accent-gold);
}

.nx-elite-option i {
    font-size: 1.1rem;
    color: var(--accent-gold);
    opacity: 0.7;
}

.nx-elite-option .nx-option-icon {
    line-height: 0;
}

.nx-elite-option:last-child {
    border-bottom: none;
}

.nx-elite-option:last-child {
    border-bottom: none;
}

.nx-elite-option:hover {
    background: linear-gradient(90deg, #03a9f445, #6dd2ff85);
    color: var(--text-primary);
}

.nx-elite-option i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--accent-primary);
}

.nx-elite-option:hover i {
    color: #000;
}

@keyframes nxFadeInDown {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.nx-mt-xs {
    margin-top: 5px;
}

.nx-mt-sm {
    margin-top: 10px;
}

.nx-ml-xs {
    margin-left: 5px;
}

.nx-mr-sm {
    margin-right: 10px;
}

.nx-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 768px) {
    .nx-grid-3 {
        grid-template-columns: 1fr;
        /* Full stack on mobile */
    }
}

/* AVATAR OVERRIDES */
.nx-avatar-override {
    overflow: hidden;
    padding: 0;
}

.nx-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-upload {
    padding: 9px 12px;
    background: var(--accent-royal);
    cursor: pointer;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.profile-avatar-upload:hover {
    border-color: var(--accent-gold);
}

/* 1. PREMIUM GALLERY GRID (1 Large, 4 Small) */
.premium-gallery-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(2, 250px);
    gap: 8px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 24px;
}

.premium-gallery-container.is-single-image {
    display: block;
    grid-template-columns: none;
    grid-template-rows: none;
    height: 450px;
    width: -webkit-fill-available;
}

.premium-gallery-container.is-single-image .premium-gallery-item {
    display: flex;
    height: -webkit-fill-available;
    width: -webkit-fill-available;
    align-items: center;
    justify-content: center;
}

.nx-app-divider {
    color: var(--text-dim);
    opacity: 0.5;
}

.premium-gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: var(--glass-border-vibrant);
    border: 1px dashed var(--accent-gold);
}

.premium-gallery-item img {
    width: -webkit-fill-available;
    height: -webkit-fill-available;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.premium-gallery-item:hover img {
    filter: brightness(0.9);
}

.premium-gallery-main {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.premium-gallery-item--top-right {
    border-top-right-radius: 12px;
}

.premium-gallery-item--top-left {
    border-top-left-radius: 12px;
}

.premium-gallery-item--bottom-right {
    border-bottom-right-radius: 10px;
}

.premium-gallery-item--bottom-left {
    border-bottom-left-radius: 10px;
}

.premium-gallery-view-all {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: white;
    border: 1px solid black;
    padding: 7px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: black;
    z-index: 10;
    cursor: pointer;
}

/* 2. GALLERY MOBILE (Phones < 768px) */
@media screen and (max-width: 767px) {
    .premium-gallery-container {
        grid-template-columns: 1fr !important;
        grid-template-rows: 280px !important;
        height: auto !important;
        border-radius: 0;
        margin: 0 -15px 24px -15px !important;
    }

    .premium-gallery-item:not(.premium-gallery-main) {
        display: none !important;
    }

    .premium-gallery-main {
        grid-column: 1 / -1 !important;
    }

    .premium-gallery-item {
        display: flex;
        border-radius: 10px;
        padding: 0;
        margin: 0px;
        align-items: center;
        justify-content: center;
    }

    .premium-gallery-view-all {
        bottom: 12px;
        right: 12px;
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* 3. STICKY BOOKING WIDGET */
.premium-booking-widget {
    background: var(--bg-surface);
    border: 1px solid var(--nexus-premium-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--nexus-premium-shadow);
    position: sticky;
    top: 100px;
    width: 100%;
    color: var(--text-dim);
}

.premium-booking-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.premium-booking-price-value {
    font-size: 22px;
    font-weight: 600;
}

.premium-booking-grid {
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
}

.premium-booking-field {
    flex: 1;
    min-width: 50%;
    padding: 10px 12px;
    border-bottom: 1px solid #b0b0b0;
}

.premium-booking-field:first-child {
    border-right: 1px solid #b0b0b0;
}

.premium-booking-field--full {
    min-width: 100%;
    border-bottom: none;
}

.premium-booking-field label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.premium-booking-field input {
    border: none;
    width: 100%;
    font-size: 14px;
    padding: 0;
    margin-top: 2px;
    outline: none;
    background: transparent;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    min-height: 24px;
    /* Stabilize height to prevent jumps */
    display: block;
}

/* Semantic adjustment for the native browser calendar trigger */
.premium-booking-field input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    transition: opacity 0.2s;
}

.premium-booking-field input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.premium-booking-field input[type="date"] {
    position: relative;
}

/* Ensure the field container handles positioning context */
.premium-booking-field {
    flex: 1;
    min-width: 50%;
    padding: 10px 12px;
    border-bottom: 1px solid #b0b0b0;
    position: relative;
    /* Context for the QR/Calendar icons */
    overflow: hidden;
    /* Avoid side bleeding */
}


/* 3. REVIEWS & RATINGS */
.premium-review-section {
    padding: 0;
    /* border-top: 1px solid var(--nexus-premium-border); */
}

.premium-review-section i {
    font-family: 'ito-icon-to5-essential' !important;
}

.premium-rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    border-bottom: 1px dashed var(--area-investment-border);
    padding-bottom: 3px;
}

.premium-rating-star {
    color: var(--accent-primary);
}

.premium-rating-icon--unfilled {
    color: var(--text-dim);
    opacity: 0.5;
}

.premium-empty-state {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--text-secondary);
    padding-left: 24px;
}

.premium-review-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.premium-review-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.premium-review-item:hover {
    border-color: var(--accent-primary-dim);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.premium-reviewer-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
    align-items: flex-start;
}

.premium-reviewer-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    margin-top: -1px;
    background: var(--bg-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.premium-reviewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.premium-reviewer-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.premium-reviewer-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.premium-review-date {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 20px;
}

.premium-review-date i {
    font-size: 14px;
    font-style: normal;
    font-family: system-ui !important;
}

.premium-review-text {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    line-height: 24px;
    color: var(--nexus-premium-text-main);
    padding: 2px 16px;
}

.premium-review-comment-icon {
    color: var(--text-dim);
    margin-top: 4px;
    /* Align with text baseline */
}

/* 4. REVIEW INTELLIGENCE (Distribution & Filters) */
.premium-review-intelligence-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
    background: var(--bg-glass);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.rating-distribution-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.distribution-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dist-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    width: 60px;
}

.dist-label i {
    font-size: 12px;
    color: var(--accent-gold);
}

.dist-bar-bg {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.dist-bar-fill {
    height: 100%;
    background: var(--accent-gold);
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.dist-count {
    font-size: 14px;
    color: var(--text-dim);
    width: 40px;
    text-align: right;
}

.review-filter-control {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--glass-border);
    padding-left: 40px;
}

.tactical-select {
    background: var(--bg-surface) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    padding: 12px !important;
    border-radius: 10px !important;
    cursor: pointer;
    font-weight: 600;
    transition: border-color 0.2s;
}

.tactical-select:hover {
    border-color: var(--accent-gold) !important;
}

@media (max-width: 768px) {
    .premium-review-intelligence-header {
        grid-template-columns: 1fr;
    }

    .review-filter-control {
        border-left: none;
        padding-left: 0;
        padding-top: 24px;
        border-top: 1px solid var(--glass-border);
    }
}

/* 5. FORMS & INPUTS (NPSP v6.3) */
.premium-form-container {
    margin-top: 3rem;
    background: var(--bg-glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.premium-node-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.premium-form-tactical .premium-form-group {
    margin-bottom: 2rem;
}

.premium-form-group {
    margin-bottom: 0rem;
}

.premium-form-label {
    display: flex !important;
    gap: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-left: 9px;
    align-items: center;
}

.premium-form-label i {
    color: var(--accent-gold);
}

.premium-status-message {
    margin-top: 1rem;
    font-size: 0.85rem;
    padding: 10px;
    border-radius: 8px;
}

.premium-status-message.is-success {
    color: var(--accent-success);
    background: rgba(var(--accent-success-rgb), 0.1);
}

.premium-status-message.is-error {
    color: var(--accent-error);
    background: rgba(var(--accent-error-rgb), 0.1);
}

.premium-listing-items {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    font-size: 14px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.premium-listing-star {
    padding-left: 7px;
}

.premium-action.liked {}

.premium-action-btn {
    background: transparent;
    color: inherit;
    border: none;
    text-decoration: underline;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    text-decoration: unset;
}

.premium-action-btn:hover,
.premium-abuse-report:hover {
    background: var(--bg-hover-primary);
}

.premium-abuse-report {
    margin-top: 4px;
    padding: 11px 15px;
    /* border-top: 1px solid var(--nexus-premium-border); */
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
    text-decoration: unset;
    width: fit-content;
    cursor: pointer;
    background: var(--nx-app-accent-dim);
}

/* 5. BADGES & REPUTATION */
.nexus-badge-premium {
    background: linear-gradient(135deg, #d4af37 0%, #f1c40f 100%);
    color: black;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    letter-spacing: 1px;
}

.node-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
}

.node-status--best {
    background: #e6fffa;
    color: #2c7a7b;
    border: 1px solid #b2f5ea;
}

.node-status--entry {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #bee3f8;
}

/* QR Code Interaction */
.qr-quick-recall img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qr-quick-recall:hover img {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* NEXUS SEMANTIC MODAL SYSTEM */
.nexus-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    vertical-align: middle;
    align-items: center;
    justify-content: center;
}

.nexus-modal.is-active {
    display: flex;
    animation: nexusFadeIn 0.3s ease;
}

.nexus-modal-content {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    max-width: 420px;
    width: 95%;
    position: relative;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.nexus-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

@keyframes nexusFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}



/* MOBILE ADAPTATION: REORDERING WIDGETS */
@media (max-width: 768px) {
    .detail-tactical-layout {
        display: flex !important;
        flex-direction: column !important;
    }

    .prop-sidebar {
        order: -1 !important;
        margin-bottom: 32px !important;
        position: static !important;
    }

    .prop-main {
        order: 1 !important;
    }
}

/* 6. SEMANTIC AUTH PROMPT (Nexus Protocol) */
.premium-auth-prompt {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-top: 16px;
    backdrop-filter: blur(10px);
}

.premium-auth-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.premium-auth-button {
    display: block;
    background: var(--accent-primary);
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

/* 7. MODALS & STRATEGIC OVERLAYS (NPSP v6.7) */
/* 7. MODALS & STRATEGIC OVERLAYS (NPSP v7.1) */
.premium-modal-card {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 24px !important;
    padding: 3rem !important;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5) !important;
    max-width: 480px;
    width: 90%;
    position: relative;
}

.premium-modal-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.premium-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 2.2rem;
    cursor: pointer;
    color: var(--text-dim);
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.premium-modal-close:hover {
    color: var(--accent-gold);
    transform: rotate(90deg);
}

.premium-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.premium-modal-header-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.premium-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.premium-modal-description {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.7;
    text-align: center;
    margin-top: 2rem;
}

.premium-modal-highlight {
    color: var(--accent-gold);
    font-weight: 700;
}

.premium-qr-container {
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-qr-container:hover {
    transform: scale(1.05);
}

.premium-qr-display {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 8. AUTH & SYSTEM PROMPTS (NPSP v7.1) */
.premium-auth-prompt-container {
    margin-top: 2.5rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--glass-border);
    border-radius: 20px;
    text-align: center;
}

.premium-auth-prompt-text {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.premium-auth-prompt-text a {
    color: var(--accent-gold);
    font-weight: 700;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(var(--accent-gold-rgb), 0.3);
    transition: all 0.2s;
}

.premium-auth-prompt-text a:hover {
    border-bottom-color: var(--accent-gold);
    filter: brightness(1.2);
}

/* 9. ERROR & EXCEPTION ECOSYSTEM (404) */
.premium-error-card {
    max-width: 640px;
    margin: 8rem auto;
    padding: 4rem 3rem;
    text-align: center;
    background: var(--bg-glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--nexus-premium-shadow);
    animation: nexusFadeUp 0.8s ease-out;
}

.premium-error-icon {
    font-size: 5.5rem;
    color: var(--accent-gold);
    display: block;
    margin-bottom: 1.5rem;
}

.premium-error-code {
    font-size: 5.5rem;
    font-weight: 950;
    line-height: 1;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-gold), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-error-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.premium-error-description {
    color: var(--text-dim);
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 2.5rem 0;
}

.premium-error-meta {
    background: var(--area-danger-bg);
    padding: 14px 24px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    border-left: 4px solid var(--accent-gold);
    display: inline-block;
    font-size: 0.9rem;
    color: var(--accent-gold);
}

.premium-error-footer {
    margin-top: 3.5rem;
}

.premium-animate-pulse {
    animation: premiumPulse 2.5s infinite ease-in-out;
}

@keyframes premiumPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.75;
        transform: scale(0.97);
    }
}

@keyframes nexusFadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 10. TACTICAL META-GRID (NPSP v7.3) */
.premium-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.premium-meta-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
}

.premium-meta-icon-box {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 2px;
}

.premium-meta-icon {
    font-size: 2.2rem;
    color: var(--accent-gold);
    line-height: 1;
}

.premium-meta-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.premium-meta-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.premium-qr-thumbnail {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--accent-gold);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.premium-qr-thumbnail:hover {
    transform: scale(1.25) translateY(-4px) rotate(3deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* 11. PREMIUM AUTH & INPUT MODULES (NPSP v8.0) */
.premium-input-icon-group {
    position: relative;
    display: flex;
    align-items: center;
}

.premium-input-icon {
    position: absolute;
    left: 16px;
    color: var(--accent-gold);
    font-size: 1.2rem;
    pointer-events: none;
}

.premium-input-icon-group .form-control {
    padding-left: 48px !important;
}

.premium-switch-node {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin: 1.5rem 0;
}

.premium-switch-info {
    flex: 1;
}

.premium-switch-label {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.premium-switch-description {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.premium-switch-control {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.premium-switch-control input {
    opacity: 0;
    width: 0;
    height: 0;
}

.premium-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
}

.premium-switch-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 3px;
    background: var(--text-dim);
    transition: .4s;
    border-radius: 50%;
}

.premium-switch-control input:checked+.premium-switch-slider {
    background: rgba(var(--accent-gold-rgb), 0.2);
    border-color: var(--accent-gold);
}

.premium-switch-control input:checked+.premium-switch-slider:before {
    transform: translateX(30px);
    background: var(--accent-gold);
    box-shadow: 0 0 15px rgba(var(--accent-gold-rgb), 0.5);
}

.premium-text-left {
    text-align: left !important;
}

.premium-text-center {
    text-align: center !important;
}

.premium-text-giant {
    font-size: 3rem !important;
}

.premium-mt-large {
    margin-top: 3.5rem !important;
}

.premium-mt-sm {
    margin-top: 1rem !important;
}

.premium-text-dim {
    color: var(--text-dim) !important;
}

.premium-hidden-protocol {
    display: none !important;
}

.premium-btn-tactical {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.premium-form-tactical {
    margin-top: 2rem;
}

.premium-badge-new {
    background: linear-gradient(135deg, var(--accent-gold), #fff);
    color: #000;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.12em;
    display: inline-block;
    vertical-align: middle;
    margin-left: 12px;
}

.premium-text-bold {
    font-weight: 700;
    color: var(--text-primary);
}

.premium-text-main {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.premium-review-item.is-expanded .premium-text-main {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}

.premium-divider {
    color: var(--text-dim);
    opacity: 0.4;
    font-weight: 300;
}

.premium-rating-display {
    color: var(--accent-gold);
    display: flex;
    gap: 2px;
    padding-left: 15px;
}

.premium-rating-display i {
    font-size: 0.9rem;
}

.premium-star-empty {
    color: var(--text-dim);
    opacity: 0.35;
}

.premium-star-full {
    color: var(--accent-gold);
}

/* 11. PUBLIC PROFILE SYSTEM (Professional Identity) */
.premium-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 1.5rem;
    margin-bottom: 3rem;
    border-radius: 14px;
    gap: 11px;
    /* il tuo CSS con backdrop-filter */
    -webkit-backdrop-filter: 3(61px);
    backdrop-filter: blur(61px);
}

.isolate {
    background: var(--area-service-bg);
    background-blend-mode: overlay;
    border-radius: 7px;
    z-index: 1;
    position: relative;
}

.profile-identity-group {
    display: flex;
    align-items: center;
    gap: 32px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-hover-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 800;
    color: white;
    border: 1px solid var(--glass-border);
    box-shadow: 0 1px 20px rgb(0 0 0 / 11%);
    overflow: hidden;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    margin: 0 0 12px 0;
    font-size: 2rem;
    font-weight: 800;
}

.profile-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.profile-meta-text {
    font-size: 0.9rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
}

.profile-stat-item {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    min-width: 100px;
}

.profile-stat-val {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-gold);
}

.profile-stat-lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    margin-top: 4px;
    font-weight: 700;
}

@media (max-width: 992px) {
    .premium-profile-header {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .profile-identity-group {
        flex-direction: column;
        gap: 20px;
    }

    .profile-stats-grid {
        width: 100%;
    }
}

/* Tab Content Visibility Logic */
.nexus-tab-content {
    display: none;
}

.nexus-tab-content.is-active {
    display: block;
    padding-top: 5px;
    padding-left: 1rem;
    padding-right: 1rem;
    animation: nexusFadeUp 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    max-height: 2400px;
    overflow-y: auto;
}

.reviewer-profile-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.reviewer-profile-link:hover {
    color: var(--accent-gold);
}

.reviewer-profile-link:hover .premium-reviewer-name {
    color: var(--accent-gold);
}

/* 12. TRUST & EDITING PROTOCOLS */
.reviewer-identity-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.nexus-verified-badge {
    background: rgba(var(--accent-success-rgb), 0.1);
    color: var(--accent-success);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(var(--accent-success-rgb), 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.review-edit-action {
    margin-left: auto;
}

.btn-edit-node {
    background: var(--bg-hover-primary);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
}

.btn-edit-node:hover {
    background: var(--accent-gold);
    color: black;
    border-color: var(--accent-gold);
}

/* Specific Identity Card Styling */
.prop-sidebar {
    max-width: 350px;
}

.nexus-identity-cert-box {
    border: 1px solid var(--accent-success) !important;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(var(--accent-success-rgb), 0.05) 100%) !important;
    padding: 18px 13px;
}

.nexus-identity-cert-box .nx-app-card-title {
    color: var(--accent-success) !important;
    padding-bottom: 5px;
    padding-left: 5px;
}

.nexus-identity-cert-box .intel-box i {
    filter: drop-shadow(0 0 10px rgba(var(--accent-success-rgb), 0.4));
}

.premium-cert-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    line-height: 1.6;
}

.integrity-report {
    padding: 9px 9px;
    /* width: max-content; */
}

.premium-integrity-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

/* DASHBOARD TAB PROTOCOL */
.dash-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 0;
    overflow-x: auto;
}

.dash-tabs .dash-btn-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 10px;
}

.dash-btn-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 20px;
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    border-radius: 0;
    white-space: nowrap;
}

.dash-btn-tab i {
    margin-right: 6px;
    font-size: 1.1rem;
}

.dash-btn-tab:hover {
    color: var(--text-primary);
}

.dash-btn-tab.is-active {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
}

/* --- NEXUS IDENTITY HUB PROTOCOL (NPSP v9.0) --- */
.premium-identity-card {
    padding: 24px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(10px);
}

.identity-hub-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.identity-avatar-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--accent-gold);
}

.identity-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.identity-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-dim);
    font-size: 24px;
    font-weight: 800;
}

.identity-meta-main {
    flex: 1;
}

.identity-node-title {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 700;
}

.identity-node-meta {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-dim);
    opacity: 0.8;
}

.identity-divider {
    border: 0;
    border-top: 1px solid var(--glass-border);
    margin: 0;
}

.identity-description-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.identity-action-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.pos-relative {
    position: relative !important;
}

/* Large Profile specific adjustments */
.profile-avatar-placeholder {
    font-size: 48px;
    font-weight: 800;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.nx-drag-zone {
    text-align: center;
    border: 2px dashed var(--glass-border);
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--radius-md);
}

.nx-drag-zone:hover,
.nx-drag-zone.is-active {
    border-color: var(--accent-gold);
    background: var(--bg-accent-dim);
}

.is-hidden {
    display: none !important;
}

.is-block {
    display: block !important;
}

.nx-w-full {
    width: 100% !important;
}

.nx-h-full {
    height: 100% !important;
}

.nx-border-none {
    border: none !important;
}

.identity-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nx-avatar-mini {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin: unset;
}

.nx-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nx-text-underline {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

.nx-text-sm {
    font-size: 0.85rem !important;
}

.nx-text-lg {
    font-size: 1.5rem !important;
}

.is-hidden {
    display: none !important;
}

/* --- NEXUS NAVIGATION PROTOCOLS --- */
.premium-back-link {
    position: absolute;
    margin-top: -38px;
    left: 5px;
    z-index: 1000;
    cursor: pointer;
    opacity: 1;
    transition: opacity 200ms ease, transform 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--area-investment-border);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-gold);
    text-decoration: none;
}

.premium-back-link:hover {
    opacity: 0.8;
    transform: scale(1.1);
    border-color: var(--accent-gold);
}

.premium-back-link i {
    font-size: 20px;
}