        /* --- GERAL E RESET --- */
        body {
            font-family: 'Inter', sans-serif;
            background-color: #111317;
            color: #A0A2A4;
            margin: 0;
            padding: 0.85rem;
        }

        * {
            box-sizing: border-box;
        }

        button {
            cursor: pointer;
            border: none;
            background: none;
            font-family: inherit;
        }

        a {
            color: #4A9CFF;
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
        }
        
        /* --- CUSTOM SCROLLBAR --- */
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: #1C1C1C; }
        ::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: #6b7280; }

        /* --- LAYOUT PRINCIPAL --- */
        .container {
            max-width: 1280px;
            margin: 0 auto;
         
        }

        header {
            margin-bottom: 0.85rem;
            display: flex;
            align-items: flex-start;
            gap: 0.65rem;
        }

        header > div {
            min-width: 0;
            flex: 1;
        }

        header h1 {
            font-size: 1.2rem;
            font-weight: 700;
            color: #ffffff;
            margin: 0;
            letter-spacing: -0.02em;
        }

        header p {
            color: #9ca3af;
            margin-top: 0.08rem;
            margin-bottom: 0;
            font-size: 0.75rem;
        }

        .app-header {
            display: block;
        }

        .app-topbar {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            margin-bottom: 0.9rem;
        }

        .brand-mark {
            font-size: 1.7rem;
            font-weight: 600;
            color: #d6b25e;
            letter-spacing: -0.04em;
            line-height: 1;
            padding-top: 0.15rem;
        }

        .cms-sidebar {
            position: fixed;
            z-index: 40;
            top: 0;
            left: 0;
            bottom: 0;
            width: min(280px, 86vw);
            display: flex;
            flex-direction: column;
            gap: 1rem;
            padding: 1.15rem 0.85rem 0.9rem;
            background: #16181e;
            border-right: 1px solid #2c3140;
            transform: translateX(-105%);
            transition: transform 0.22s ease;
        }

        body.cms-nav-open .cms-sidebar {
            transform: translateX(0);
        }

        body.cms-nav-open {
            overflow: hidden;
        }

        .cms-sidebar .brand-mark {
            padding: 0.15rem 0.7rem 0;
        }

        .cms-nav {
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
            align-items: stretch;
        }

        .cms-nav button {
            width: 100%;
            text-align: left;
            padding: 0.58rem 0.7rem;
            border-radius: 0.5rem;
            border: 0;
            background: transparent;
            color: #e5e7eb;
            font-size: 0.86rem;
            font-weight: 600;
        }

        .cms-menu-btn {
            width: 2.1rem;
            height: 2.1rem;
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-top: 0.05rem;
            padding: 0;
            border-radius: 0.5rem;
            border: 1px solid #3a3f4b;
            color: #e5e7eb;
            background: #16181e;
        }

        .cms-menu-btn svg {
            width: 1.05rem;
            height: 1.05rem;
        }

        .cms-backdrop {
            position: fixed;
            z-index: 35;
            inset: 0;
            border: 0;
            padding: 0;
            background: rgba(0, 0, 0, 0.55);
        }

        .cms-backdrop[hidden] {
            display: none;
        }

        #logout-btn {
            margin-top: auto;
            width: 100%;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.58rem 0.7rem;
            border-radius: 0.5rem;
            border: 1px solid #3a3f4b;
            color: #e5e7eb;
            font-size: 0.86rem;
            font-weight: 600;
        }

        #logout-btn svg {
            width: 0.95rem;
            height: 0.95rem;
            flex-shrink: 0;
        }

        #logout-btn:hover,
        .cms-menu-btn:hover,
        .cms-nav button:hover {
            background: rgba(255, 255, 255, 0.08);
        }

        .cms-nav button.is-active {
            background: #ffffff;
            color: #111317;
        }

        .cms-nav button.is-active:hover {
            background: #ffffff;
            color: #111317;
        }

        @media (min-width: 960px) {
            body {
                padding-left: calc(220px + 1.25rem);
            }

            body.cms-nav-open {
                overflow: auto;
            }

            .cms-sidebar {
                width: 220px;
                transform: none;
            }

            .cms-menu-btn,
            .cms-backdrop {
                display: none;
            }
        }

        /* --- SEARCH BAR --- */
        .search-container {
            position: relative;
            margin-bottom: 0.6rem;
        }

        .search-icon {
            position: absolute;
            left: 0.65rem;
            top: 50%;
            width: 0.85rem;
            height: 0.85rem;
            transform: translateY(-50%);
            color: #6b7280;
            pointer-events: none;
        }

        #search-bar {
            width: 100%;
            padding: 0.4rem 0.7rem;
            background-color: #1C1F2A;
            border: 1px solid #2c3140;
            border-radius: 0.5rem;
            color: #E5E7EB;
            font-size: 0.75rem;
            transition: border-color 0.2s;
        }

        .search-container:has(.search-icon) #search-bar {
            padding-left: 1.85rem;
        }

        #search-bar:focus {
            outline: none;
            border-color: #4A9CFF;
        }

        #search-bar::placeholder {
            color: #6b7280;
        }

        /* --- FILTROS --- */
        .filters {
            display: flex;
            gap: 0.45rem;
            margin-bottom: 0.85rem;
        }

        .filter-btn {
            flex: 1 1 0;
            min-width: 0;
            padding: 0.55rem 0.35rem;
            border-radius: 0.7rem;
            border: 1px solid #2c3140;
            font-size: 0.78rem;
            font-weight: 600;
            line-height: 1.2;
            transition: all 0.2s;
            color: #9ca3af;
            background: transparent;
        }
        .filter-btn:hover {
            background-color: #1c1f2a;
            color: #e5e7eb;
        }
        .filter-btn-active {
            background-color: #232733;
            border-color: #3d4456;
            color: #f9fafb;
        }
        .filter-count {
            font-variant-numeric: tabular-nums;
            font-weight: 600;
        }

        .queue-filters {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.45rem 1.1rem;
            margin: -0.45rem 0 0.85rem;
            padding: 0.4rem 0.55rem;
            border-radius: 0.7rem;
            background: #16181f;
            border: 1px solid #23262f;
        }
        .queue-filters[hidden] { display: none; }
        .queue-filter-group {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            min-width: 0;
        }
        .queue-filter-label {
            font-size: 0.62rem;
            font-weight: 600;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #6b7280;
        }
        .queue-filter-options {
            display: inline-flex;
            align-items: center;
            gap: 0.1rem;
            padding: 0.12rem;
            border-radius: 999px;
            background: #101217;
            border: 1px solid #2a2e3a;
        }
        .queue-filter {
            padding: 0.22rem 0.55rem;
            border: 0;
            border-radius: 999px;
            font-family: inherit;
            font-size: 0.68rem;
            font-weight: 600;
            line-height: 1.2;
            color: #8b909a;
            background: transparent;
            cursor: pointer;
        }
        .queue-filter [data-queue-count] {
            margin-left: 0.2rem;
            font-variant-numeric: tabular-nums;
            font-weight: 500;
            color: #6b7280;
        }
        .queue-filter:hover {
            color: #e5e7eb;
        }
        .queue-filter.is-active {
            background: #2a2418;
            color: #f6e7c1;
            box-shadow: inset 0 0 0 1px rgba(214, 178, 94, 0.45);
        }
        .queue-filter.is-active [data-queue-count] {
            color: #d6b25e;
        }

        /* --- LISTA DE APLICAÇÕES / REPORTS --- */
        #applications-list,
        #complaints-list,
        #preapproved-list {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 0.75rem;
        }

        @media (min-width: 960px) {
            #applications-list,
            #complaints-list,
            #preapproved-list {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 0.9rem;
            }
        }
        
        #no-applications, #no-preapproved, #loader {
            text-align: center;
            padding: 2.5rem 0;
            color: #6b7280;
        }

        #loader svg {
            animation: spin 1s linear infinite;
            height: 2rem;
            width: 2rem;
            color: white;
            margin: 0 auto;
        }
        @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

        /* --- CARD DE APLICAÇÃO --- */
        .app-card {
            background-color: #1C1F2A;
            border-radius: 0.85rem;
            padding: 0.85rem;
            box-shadow: none;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            border: 1px solid #2a2e3a;
            min-width: 0;
        }
        .app-card-content {
            flex-grow: 1;
        }
        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 0.5rem;
        }
        .card-user-info {
            display: flex;
            align-items: flex-start;
            gap: 0.7rem;
            min-width: 0;
            flex: 1;
        }
        .card-avatar {
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 9999px;
            object-fit: cover;
            flex-shrink: 0;
        }
        .card-user-details { min-width: 0; flex: 1; }
        .card-user-details h3 { font-weight: 700; font-size: 1rem; color: #fff; margin: 0; line-height: 1.25; }
        .card-user-details p { font-size: 0.8rem; color: #9ca3af; margin: 0.1rem 0 0; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .card-user-details p.city { color: #8b909a; display: flex; align-items: center; gap: 0.25rem; }
        .pin-icon { width: 0.7rem; height: 0.7rem; flex-shrink: 0; }
        .card-section { margin-top: 0.7rem; }
        .card-section h4 { font-size: 0.78rem; color: #8b909a; margin: 0; font-weight: 500; }
        .card-industries { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
        .industry-tag { background-color: #2a2d36; color: #d1d5db; font-size: 0.72rem; font-weight: 500; padding: 0.22rem 0.55rem; border-radius: 9999px; }
        .card-bio { color: #fff; font-size: 0.875rem; margin-top: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .card-submitted { margin: 0.65rem 0 0; font-size: 0.75rem; color: #6b7280; }
        .card-footer {
            margin-top: 0.75rem;
            border-top: none;
            padding-top: 0;
            display: flex;
            align-items: center;
            gap: 0.45rem;
        }
        
        /* --- BOTÕES DO CARD --- */
        .card-btn {
            font-size: 0.8rem;
            font-weight: 600;
            border-radius: 0.6rem;
            padding: 0.55rem 0.7rem;
            min-height: 2.45rem;
            transition: background-color 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            white-space: nowrap;
        }
        .btn-details { flex: 1; color: #5aa7ff; border: 1px solid #3d7dff; }
        .btn-details:hover { background-color: rgba(74, 156, 255, 0.1); }
        .btn-approve { flex: 0 0 auto; color: #fff; background-color: #1f9d4e; min-width: 5.1rem; }
        .btn-approve:hover { background-color: #188a43; }
        .btn-deny { flex: 0 0 auto; color: #fff; background-color: #d64545; min-width: 4.4rem; }
        .btn-deny:hover { background-color: #c13636; }
        .btn-awaiting { flex: 0 0 auto; color: #fbbf24; border: 1px solid #92400e; }
        .btn-awaiting:hover { background-color: rgba(251, 191, 36, 0.1); }
        .btn-payment-completed { flex: 0 0 auto; color: #fff; background-color: #1f9d4e; }
        .btn-payment-completed:hover { background-color: #188a43; }
        .status-awaiting { background-color: #3f2d12; color: #fbbf24; border: 1px solid #92400e; }
        .btn-hold { color: #fbbf24; border: 1px solid #92400e; }
        .btn-hold:hover:not(:disabled) { background-color: rgba(251, 191, 36, 0.1); }
        .btn-hold:disabled { opacity: 0.6; cursor: not-allowed; }
        @keyframes sync-spin {
            to { transform: rotate(360deg); }
        }
        
        /* --- BADGE DE STATUS --- */
        .status-badge {
            font-size: 0.72rem;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            padding: 0.22rem 0.55rem;
            border-radius: 9999px;
            flex-shrink: 0;
        }
        .card-status-row,
        .modal-status-row {
            display: flex;
            align-items: flex-start;
            justify-content: flex-end;
            flex-wrap: wrap;
            gap: 0.4rem;
            flex-shrink: 0;
        }
        .reviewed-toggle {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 0.28rem;
            margin: 0;
            color: #9ca3af;
            font-size: 0.72rem;
            font-weight: 600;
            line-height: 1;
            cursor: pointer;
            user-select: none;
        }
        .reviewed-toggle input {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }
        .reviewed-box {
            width: 0.9rem;
            height: 0.9rem;
            border: 1px solid #6b7280;
            border-radius: 0.2rem;
            display: inline-grid;
            place-items: center;
            background: transparent;
            color: #111317;
        }
        .reviewed-box svg { display: none; }
        .reviewed-toggle input:checked + .reviewed-box,
        .reviewed-toggle.is-checked .reviewed-box {
            background: #d6b25e;
            border-color: #d6b25e;
        }
        .reviewed-toggle input:checked + .reviewed-box svg,
        .reviewed-toggle.is-checked .reviewed-box svg { display: block; }
        .reviewed-toggle input:focus-visible + .reviewed-box {
            outline: 2px solid #d6b25e;
            outline-offset: 2px;
        }
        .reviewed-toggle.is-busy {
            opacity: 0.55;
            cursor: progress;
        }
        .status-pending { background-color: #3A3D4A; color: #d1d5db; border: 1px solid #4b5563; }
        .status-approved { background-color: #05966970; color: #fff; }
        .status-rejected { background-color: #dc262670; color: #fff; }

        /* --- CLOUT SCORE BADGE --- */
        .clout-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.25rem 0.5rem;
            border-radius: 0.375rem;
            font-size: 0.75rem;
            font-weight: 600;
            background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
            color: #000;
        }
        .clout-badge svg {
            width: 12px;
            height: 12px;
        }
        .clout-score-large {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            border-radius: 0.5rem;
            background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
            color: #000;
            font-weight: 700;
            font-size: 1rem;
        }
        .clout-score-large svg {
            width: 16px;
            height: 16px;
        }
        .clout-score-label {
            font-size: 0.75rem;
            font-weight: 500;
            opacity: 0.8;
        }

        /* --- FRIENDS IN APP BADGE --- */
        .friends-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.25rem 0.5rem;
            border-radius: 0.375rem;
            font-size: 0.75rem;
            font-weight: 600;
            background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
            color: #fff;
            margin-left: 0.5rem;
        }
        .friends-badge svg {
            width: 12px;
            height: 12px;
        }
        .friends-score-large {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.4rem 0.65rem;
            min-height: 2.2rem;
            border-radius: 0.5rem;
            background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
            color: #fff;
            font-weight: 700;
            font-size: 0.9rem;
        }
        .friends-score-large svg {
            width: 16px;
            height: 16px;
        }

        /* --- INSTAGRAM MUTUALS BADGE & SCORE --- */
        .instagram-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.25rem 0.5rem;
            border-radius: 0.375rem;
            font-size: 0.75rem;
            font-weight: 600;
            background: linear-gradient(135deg, #833AB4 0%, #E1306C 70%, #F77737 100%);
            color: #fff;
            margin-left: 0.5rem;
        }
        .instagram-badge svg {
            width: 12px;
            height: 12px;
        }
        .instagram-mutuals-large {
            background: linear-gradient(135deg, #833AB4 0%, #E1306C 70%, #F77737 100%);
        }
        .card-social-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
            margin-top: 0.4rem;
        }
        .card-social-badges .friends-badge,
        .card-social-badges .instagram-badge {
            margin-left: 0;
        }

        /* --- LIST POPUP (acima do modal de detalhes) --- */
        #list-popup {
            position: fixed;
            inset: 0;
            background-color: rgba(0, 0, 0, 0.85);
            display: none;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            z-index: 100;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        #list-popup.visible {
            opacity: 1;
        }
        .list-popup-inner {
            background-color: #1C1C1C;
            border-radius: 0.75rem;
            border: 1px solid #374151;
            width: 100%;
            max-width: 32rem;
            max-height: 80vh;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            position: relative;
            transform: translateY(8px);
            transition: transform 0.2s ease;
        }
        #list-popup.visible .list-popup-inner {
            transform: translateY(0);
        }
        .list-popup-inner .close-popup-btn {
            position: absolute;
            top: 0.75rem;
            right: 0.75rem;
            width: 2rem;
            height: 2rem;
            border-radius: 9999px;
            border: none;
            background-color: transparent;
            color: #9ca3af;
            font-size: 1.5rem;
            cursor: pointer;
            line-height: 1;
        }
        .list-popup-inner .close-popup-btn:hover {
            background-color: #2D3340;
            color: #fff;
        }
        .list-popup-inner h3 {
            color: #fff;
            font-size: 1.125rem;
            font-weight: 700;
            margin: 0 2rem 0.25rem 0;
        }
        .list-popup-count {
            color: #9ca3af;
            font-size: 0.8125rem;
            margin-bottom: 1rem;
        }
        .list-popup-list {
            overflow-y: auto;
            display: grid;
            gap: 0.625rem;
            padding-right: 0.25rem;
        }
        button.list-popup-trigger,
        .list-popup-trigger {
            cursor: pointer !important;
            border: none !important;
            text-align: left !important;
            font: inherit;
            width: 100% !important;
            display: flex !important;
            align-items: center !important;
            justify-content: flex-start !important;
            box-sizing: border-box !important;
            transition: filter 0.15s ease, transform 0.15s ease;
        }
        .list-popup-trigger:hover {
            filter: brightness(1.08);
            transform: translateY(-1px);
        }
        .list-popup-trigger:disabled {
            cursor: not-allowed;
            opacity: 0.6;
        }
        .list-popup-trigger .contact-count-action {
            margin-left: auto;
            font-size: 0.75rem;
            font-weight: 600;
            opacity: 0.85;
        }

        /* --- INSTAGRAM SYNC BUTTON (within modal) --- */
        button.modal-sync-ig-btn,
        .modal-sync-ig-btn {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 0.35rem !important;
            width: auto !important;
            margin-left: auto !important;
            padding: 0.28rem 0.55rem !important;
            border-radius: 0.4rem !important;
            font-size: 0.75rem !important;
            font-weight: 650 !important;
            color: #e5e7eb !important;
            background: transparent !important;
            border: 1px solid #3a3f4b !important;
            cursor: pointer !important;
            transition: background 0.15s !important;
            font-family: inherit !important;
            box-sizing: border-box !important;
            line-height: 1.2 !important;
        }
        .modal-sync-ig-btn:hover:not(:disabled) {
            background: #1c1f27 !important;
        }
        .modal-sync-ig-btn:disabled {
            cursor: not-allowed !important;
            opacity: 0.55 !important;
        }
        .modal-sync-ig-btn svg,
        .modal-sync-ig-btn .sync-ig-icon {
            width: 16px !important;
            height: 16px !important;
            flex-shrink: 0 !important;
        }
        .modal-sync-ig-btn.syncing {
            pointer-events: none;
            opacity: 0.85;
        }
        .modal-sync-ig-btn.syncing .sync-ig-icon {
            animation: sync-spin 0.9s linear infinite;
        }
        .modal-sync-ig-hint {
            color: #9ca3af;
            font-size: 0.72rem;
            margin: 0.28rem 0 0;
            line-height: 1.3;
        }
        .modal-sync-ig-status {
            color: #d1d5db;
            font-size: 0.72rem;
            font-weight: 600;
            margin: 0.18rem 0 0;
            line-height: 1.3;
        }
        .modal-sync-ig-status:empty {
            display: none;
        }
        .contact-count-toggle {
            width: 100%;
            justify-content: flex-start;
            transition: filter 0.2s, transform 0.2s;
        }
        .contact-count-toggle:hover {
            filter: brightness(1.08);
            transform: translateY(-1px);
        }
        .contact-count-action {
            margin-left: auto;
            font-size: 0.75rem;
            font-weight: 600;
            opacity: 0.85;
        }
        .contacts-in-app-panel {
            margin-top: 0.75rem;
            border: 1px solid #2D3340;
            border-radius: 0.5rem;
            background-color: #171A20;
            overflow: hidden;
        }
        .contacts-in-app-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            padding: 0.625rem 0.75rem;
            color: #d1d5db;
            font-size: 0.8125rem;
            font-weight: 600;
            border-bottom: 1px solid #2D3340;
        }
        .contacts-in-app-header strong {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 1.5rem;
            height: 1.5rem;
            border-radius: 9999px;
            background-color: #2D2F34;
            color: #ffffff;
            font-size: 0.75rem;
        }
        .contacts-in-app-list {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.5rem;
            padding: 0.75rem;
        }
        .contacts-in-app-item {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            min-width: 0;
        }
        .contacts-in-app-avatar {
            width: 2rem;
            height: 2rem;
            border-radius: 9999px;
            object-fit: cover;
            flex: 0 0 auto;
        }
        .contacts-in-app-info {
            display: flex;
            flex-direction: column;
            min-width: 0;
            line-height: 1.25;
        }
        .contacts-in-app-info span,
        .contacts-in-app-info a {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .contacts-in-app-info > span:first-child {
            color: #f3f4f6;
            font-weight: 600;
        }
        .contacts-in-app-info a {
            color: #93c5fd;
            font-size: 0.75rem;
        }
        .contacts-in-app-saved-name,
        .contacts-in-app-empty {
            color: #9ca3af;
            font-size: 0.75rem;
        }
        .contacts-in-app-empty {
            margin: 0;
            padding: 0.75rem;
        }
        .instagram-mutuals {
            margin-top: 0.75rem;
            border: 1px solid #2D3340;
            border-radius: 0.5rem;
            background-color: #171A20;
            overflow: hidden;
        }
        .instagram-mutuals-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            padding: 0.625rem 0.75rem;
            color: #d1d5db;
            font-size: 0.8125rem;
            font-weight: 600;
            border-bottom: 1px solid #2D3340;
        }
        .instagram-mutuals-header strong {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 1.5rem;
            height: 1.5rem;
            border-radius: 9999px;
            background-color: #2D2F34;
            color: #ffffff;
            font-size: 0.75rem;
        }
        .instagram-mutuals-list {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.5rem;
            padding: 0.75rem;
        }
        .instagram-mutual-item {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            min-width: 0;
        }
        .instagram-mutual-avatar {
            width: 2rem;
            height: 2rem;
            border-radius: 9999px;
            object-fit: cover;
            flex: 0 0 auto;
        }
        .instagram-mutual-info {
            display: flex;
            flex-direction: column;
            min-width: 0;
            line-height: 1.25;
        }
        .instagram-mutual-info span,
        .instagram-mutual-info a {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .instagram-mutual-info span {
            color: #f3f4f6;
            font-weight: 600;
        }
        .instagram-mutual-info a {
            color: #93c5fd;
            font-size: 0.75rem;
        }
        .instagram-mutuals-empty {
            margin: 0;
            padding: 0.75rem;
            color: #6b7280;
            font-size: 0.8125rem;
        }
        .scores-container {
            display: flex;
            gap: 0.75rem;
            flex-wrap: wrap;
            margin-bottom: 1rem;
        }

        /* --- MODAL --- */
        .modal {
            position: fixed;
            inset: 0;
            background-color: rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            z-index: 50;
            display: none; /* Initially hidden */
        }
        .modal-content-wrapper {
            background-color: #1C1C1C;
            border-radius: 0.75rem;
            box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
            width: 100%;
            max-width: 42rem;
            min-width: 0;
            min-height: 0;
            max-height: calc(100vh - 2rem);
            max-height: calc(100dvh - 2rem);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border: 1px solid #374151;
            transform: scale(0.95);
            transition: transform 0.3s, opacity 0.3s;
        }
        .modal.visible .modal-content-wrapper {
            transform: scale(1);
            opacity: 1;
        }
        .modal-content {
            padding: 0.85rem 0.85rem 0.65rem;
            position: relative;
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
        }
        #close-modal-btn {
            position: absolute;
            top: 0.35rem;
            right: 0.5rem;
            color: #6b7280;
            font-size: 1.55rem;
            line-height: 1;
            font-weight: 300;
        }
        #close-modal-btn:hover { color: #fff; }

        #modal-content-wrapper{
            background-color: #14161A;
        }

        .modal-header { display: flex; align-items: flex-start; gap: 0.7rem; padding-right: 1.4rem; }
        .modal-queue-controls {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 0.45rem;
            flex-shrink: 0;
        }
        .modal-header .modal-queue-controls {
            margin-left: auto;
            padding-top: 0.15rem;
        }
        .modal-avatar { width: 2.85rem; height: 2.85rem; border-radius: 9999px; object-fit: cover; flex-shrink: 0; }
        .profile-photo-clickable { cursor: pointer; transition: opacity 0.2s; }
        .profile-photo-clickable:hover { opacity: 0.8; }
        .modal-header .modal-status-row { margin-bottom: 0.15rem; justify-content: flex-start; }

        /* Troca manual da foto pelo admin. Botao proprio, e nao um overlay sobre
           o avatar: no celular nao existe hover, e a area de toque precisa ser
           grande o bastante para nao competir com o clique que abre o lightbox. */
        .modal-header-details { min-width: 0; }
        /* E-mails longos nao tem espaco onde quebrar; sem isso eles vazam para
           fora do modal no celular. */
        .modal-header-details h2,
        .modal-header-details > p { overflow-wrap: anywhere; }
        .replace-photo-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.3rem;
            min-height: 0;
            margin-top: 0.28rem;
            padding: 0;
            background: transparent;
            color: #93c5fd;
            border: 0;
            border-radius: 0;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
        }
        .replace-photo-btn:hover:not(:disabled) { color: #bfdbfe; }
        .replace-photo-btn:disabled { cursor: progress; color: #9ca3af; }
        .replace-photo-feedback { margin-top: 0.3rem; font-size: 0.72rem; color: #9ca3af; }
        .replace-photo-feedback:empty { display: none; }
        .replace-photo-feedback-error { color: #F87171; }
        .replace-photo-feedback-success { color: #34D399; }

        /* No celular o botao ocupa a linha inteira: com o avatar ao lado, sobra
           pouca largura para um alvo de toque confortavel. */
        @media (max-width: 480px) {
            .modal-facts { grid-template-columns: 1fr; }
        }
        .modal-header h2 { font-size: 1.12rem; font-weight: 700; color: #fff; margin: 0; line-height: 1.2; }
        .modal-header p { color: #9ca3af; margin: 0.08rem 0 0; font-size: 0.8rem; line-height: 1.3; }
        .modal-body { margin-top: 1rem; display: flex; flex-direction: column; gap: 1rem; font-size: 0.82rem; }
        .modal-card {
            display: flex;
            flex-direction: column;
            gap: 0.65rem;
            min-width: 0;
            padding: 1rem 1.05rem 1.1rem;
            background: #1a1d24;
            border: 2px solid #6b7280;
            border-radius: 0.75rem;
        }
        .modal-card h4 {
            margin: 0;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid #2e3440;
            color: #f8fafc;
            font-size: 1rem;
            font-weight: 700;
            letter-spacing: 0;
            line-height: 1.25;
            text-transform: none;
        }
        .modal-card h4 + h4 { margin-top: 0.35rem; }
        .modal-card > summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            cursor: pointer;
            margin: 0;
            color: #f8fafc;
            font-size: 1rem;
            font-weight: 700;
            line-height: 1.25;
            list-style: none;
        }
        .modal-card > summary::-webkit-details-marker { display: none; }
        .modal-card > summary::after {
            content: '';
            flex: 0 0 auto;
            width: 0.5rem;
            height: 0.5rem;
            margin-right: 0.15rem;
            border-right: 2px solid #E8C998;
            border-bottom: 2px solid #E8C998;
            transform: rotate(45deg);
        }
        .modal-card[open] > summary::after {
            transform: rotate(-135deg);
            margin-top: 0.25rem;
        }
        .modal-card[open] > summary {
            padding-bottom: 0.5rem;
            border-bottom: 1px solid #2e3440;
        }
        .modal-empty { margin: 0; color: #6b7280; font-size: 0.78rem; }
        .modal-facts {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.45rem 0.75rem;
            margin: 0;
        }
        .modal-facts dt { color: #6b7280; font-size: 0.68rem; }
        .modal-facts dd { margin: 0.08rem 0 0; color: #e5e7eb; font-size: 0.8rem; overflow-wrap: anywhere; }
        .modal-facts .ig-fact { grid-column: 1 / -1; }
        .ig-fact-line,
        .ig-editor {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            min-width: 0;
        }
        .ig-fact-line[hidden],
        .ig-editor[hidden],
        .ig-handle-link[hidden],
        .ig-handle-empty[hidden] { display: none !important; }
        .ig-handle-link {
            color: #e5e7eb;
            font-size: 0.8rem;
            text-decoration: none;
        }
        .ig-handle-link:hover { color: #93c5fd; text-decoration: underline; }
        .ig-handle-empty { color: #e5e7eb; font-size: 0.8rem; }
        .ig-edit-btn {
            flex-shrink: 0;
            margin: 0;
            padding: 0;
            border: 0;
            background: transparent;
            color: #93c5fd;
            font-size: 0.72rem;
            font-weight: 650;
            cursor: pointer;
        }
        .ig-edit-btn:hover { color: #bfdbfe; }
        .ig-editor .ig-editor-row { flex: 1; }
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }
        .modal-field-label {
            display: block;
            margin-bottom: 0.28rem;
            color: #6b7280;
            font-size: 0.68rem;
        }
        .ig-editor-row {
            display: flex;
            align-items: center;
            min-width: 0;
            background: #0c0e12;
            border: 1px solid #3a3f4b;
            border-radius: 0.5rem;
        }
        .ig-editor-row:focus-within { border-color: #d6b25e; }
        .ig-editor-prefix {
            padding-left: 0.7rem;
            color: #9ca3af;
            font-weight: 650;
        }
        .instagram-handle-input {
            flex: 1;
            min-width: 0;
            padding: 0.55rem 0.45rem;
            border: 0;
            background: transparent;
            color: #f3f4f6;
            color-scheme: dark;
            font-size: 0.85rem;
        }
        .instagram-handle-input:focus { outline: none; }
        .instagram-handle-input:disabled { opacity: 0.65; }
        .instagram-handle-input::placeholder { color: #6b7280; }
        .instagram-handle-save {
            flex-shrink: 0;
            margin: 0.22rem;
            padding: 0.38rem 0.7rem;
            border: 0;
            border-radius: 0.35rem;
            background: #e5e7eb;
            color: #111317;
            font-size: 0.75rem;
            font-weight: 700;
            cursor: pointer;
        }
        .instagram-handle-save:hover:not(:disabled) { background: #fff; }
        .instagram-handle-save:disabled { cursor: progress; opacity: 0.55; }
        .modal-inline-actions {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
        }
        .ig-open {
            color: #93c5fd;
            font-size: 0.75rem;
            font-weight: 600;
            text-decoration: none;
        }
        .ig-open:hover { text-decoration: underline; }
        .ig-open[hidden] { display: none; }
        .instagram-handle-feedback { margin: 0; }
        .modal-body .friends-score-large {
            background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
            border: 0;
            color: #fff;
            font-size: 0.8rem;
            font-weight: 650;
        }
        .modal-body .instagram-mutuals-large {
            background: linear-gradient(135deg, #833AB4 0%, #E1306C 70%, #F77737 100%);
            border: 0;
            color: #fff;
        }
        .modal-body .instagram-mutuals-large .clout-score-label {
            flex: 1;
            min-width: 0;
            white-space: normal;
            line-height: 1.25;
        }
        .modal-body .friends-score-large svg { color: #fff; }
        .modal-controls { gap: 0.65rem; }
        .modal-controls .screen-capture-panel { gap: 0.15rem; }
        .modal-controls .screen-capture-title { font-size: 0.82rem; font-weight: 600; }
        .input-display { background-color: #14161A; border: 1px solid #374151; border-radius: 0.45rem; padding: 0.42rem 0.6rem; color: #A0A2A4; word-wrap: break-word; }
        .modal-footer {
            padding: 0.55rem 0.7rem;
            background-color: rgba(0,0,0,0.2);
            border-bottom-left-radius: 0.75rem;
            border-bottom-right-radius: 0.75rem;
            display: flex;
            gap: 0.45rem;
            flex: 0 0 auto;
        }
        .modal-footer button {
            flex: 1;
            font-weight: 700;
            padding: 0.52rem 0.7rem;
            min-height: 2.35rem;
            border-radius: 0.5rem;
        }
        .btn-modal-reject {
            background-color: #4B1B1B;
            color: #F87171;
            border: 1px solid #7f1d1d;
            transition: background-color 0.2s;
        }
        .btn-modal-reject:hover { background-color: #5F2121; }
        .btn-modal-approve {
            background-color: #2D2F34;
            color: #E5E7EB;
            transition: background-color 0.2s;
        }
        .btn-modal-approve:hover { background-color: #3E4045; }
        .btn-modal-awaiting {
            background-color: #2D2F34;
            color: #fbbf24;
            border: 1px solid #92400e;
        }
        .btn-modal-awaiting:hover { background-color: #3E4045; }
        .btn-modal-payment-completed {
            background-color: #1f9d4e;
            color: #fff;
        }
        .btn-modal-payment-completed:hover { background-color: #188a43; }
        .btn-modal-hold {
            background-color: #2D2F34;
            color: #fbbf24;
            border: 1px solid #92400e;
            transition: background-color 0.2s;
        }
        .btn-modal-hold:hover:not(:disabled) { background-color: #3E4045; }
        .btn-modal-hold:disabled { opacity: 0.6; cursor: not-allowed; }

        .impact-link {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 0.5rem;
            padding: 0.5rem;
        }
        .impact-link a {
            flex: 1 1 auto;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .copy-btn {
            flex: 0 0 auto;
            margin-left: 1rem;
            background-color: #374151;
            color: #fff;
            font-size: 0.75rem;
            font-weight: 700;
            padding: 0.25rem 0.75rem;
            border-radius: 0.375rem;
        }
        .copy-btn:hover {
            background-color: #4b5563;
        }
        .photo-gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
            gap: 0.4rem;
            margin-top: 0.2rem;
        }
        .photo-gallery img {
            width: 100%;
            height: 84px;
            object-fit: cover;
            border-radius: 0.5rem;
            transition: opacity 0.2s;
        }
        .photo-gallery img:hover {
            opacity: 0.8;
        }
        .gallery-photo-clickable {
            cursor: pointer;
        }
        .editorial-gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 0.75rem;
            margin-top: 0.35rem;
        }
        .editorial-card {
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }
        .editorial-card img {
            width: 100%;
            height: 160px;
            object-fit: cover;
            border-radius: 0.5rem;
            background: #14161A;
        }
        .editorial-download {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 32px;
            padding: 0.25rem 0.6rem;
            border-radius: 0.375rem;
            background: #374151;
            color: #fff;
            font-size: 0.75rem;
            font-weight: 700;
            text-decoration: none;
        }
        .editorial-download:hover {
            background: #4b5563;
        }

        /* --- MEMBER MAGAZINE --- */
        .magazine-hint {
            color: #6b7280;
            font-size: 0.72rem;
            line-height: 1.3;
            margin: 0 0 0.35rem;
        }
        .magazine-dropzone {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.1rem;
            padding: 0.7rem 0.65rem;
            border: 1px dashed #374151;
            border-radius: 0.5rem;
            background-color: #14161A;
            cursor: pointer;
            text-align: center;
            transition: border-color 0.2s, background-color 0.2s;
        }
        .magazine-dropzone:hover,
        .magazine-dropzone:focus-visible,
        .magazine-dropzone.dragging {
            border-color: #E8C998;
            background-color: #1a1d22;
            outline: none;
        }
        .magazine-dropzone.disabled {
            opacity: 0.5;
            pointer-events: none;
        }
        .magazine-dropzone-title {
            color: #d1d5db;
            font-weight: 600;
            font-size: 0.9rem;
        }
        .magazine-dropzone-hint {
            color: #6b7280;
            font-size: 0.78rem;
        }
        .magazine-feedback {
            font-size: 0.82rem;
            line-height: 1.4;
            min-height: 1.1rem;
            margin-top: 0.5rem;
            color: #6b7280;
        }
        .magazine-feedback-success { color: #4ade80; }
        .magazine-feedback-warning { color: #E8C998; }
        .magazine-feedback-error { color: #f87171; }
        .magazine-empty {
            color: #6b7280;
            font-size: 0.85rem;
        }
        .magazine-gallery {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
            margin-top: 0.5rem;
        }
        /* Escrita em voo: bloqueia novo arrasto e deixa visivel que ainda nao
           terminou, para o admin nao achar que a acao ja foi confirmada. */
        .magazine-gallery.busy {
            opacity: 0.55;
            pointer-events: none;
        }
        .magazine-page {
            display: grid;
            grid-template-columns: 72px minmax(0, 1fr);
            gap: 0.65rem;
            align-items: center;
            margin: 0;
            padding: 0.45rem;
            border-radius: 0.5rem;
            background-color: #14161A;
            border: 1px solid #374151;
            transition: border-color 0.2s, opacity 0.2s;
        }
        .magazine-page:hover { border-color: #4b5563; }
        .magazine-page.dragging { opacity: 0.4; }
        .magazine-page.drop-target {
            border-color: #E8C998;
        }
        .magazine-page img {
            display: block;
            width: 72px;
            /* 4:5 fixo com cover: espelha exatamente o carrossel do app, para
               o admin ver o mesmo enquadramento — e o mesmo corte — que o
               membro vai ver. */
            aspect-ratio: 4 / 5;
            object-fit: cover;
            border-radius: 0.35rem;
            cursor: grab;
        }
        .magazine-page img:active { cursor: grabbing; }
        .magazine-page figcaption {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 0.4rem;
            min-width: 0;
            padding: 0;
            font-size: 0.78rem;
            color: #A0A2A4;
            text-align: left;
        }
        .magazine-page-label {
            color: #e5e7eb;
            font-weight: 600;
        }
        .magazine-page-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 0.3rem;
        }
        .magazine-action {
            border: 1px solid #374151;
            border-radius: 0.35rem;
            background: #1c1f24;
            color: #e5e7eb;
            font-size: 0.72rem;
            font-weight: 600;
            line-height: 1;
            padding: 0.35rem 0.5rem;
            cursor: pointer;
        }
        .magazine-action:hover { border-color: #E8C998; color: #fff; }
        .magazine-action:disabled {
            opacity: 0.35;
            cursor: default;
            border-color: #374151;
            color: #9ca3af;
        }
        .magazine-action-remove:hover {
            border-color: #b91c1c;
            color: #fecaca;
        }

        /* --- IMAGE LIGHTBOX --- */
        .image-lightbox {
            position: fixed;
            inset: 0;
            background-color: rgba(0, 0, 0, 0.9);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 100;
            opacity: 0;
            transition: opacity 0.3s;
        }
        .image-lightbox.visible {
            display: flex;
            opacity: 1;
        }
        .image-lightbox img {
            max-width: 90vw;
            max-height: 90vh;
            object-fit: contain;
            border-radius: 0.5rem;
        }
        #close-lightbox-btn {
            position: absolute;
            top: 1rem;
            right: 1rem;
            color: #fff;
            font-size: 3rem;
            line-height: 1;
            font-weight: 300;
            background: rgba(0, 0, 0, 0.5);
            width: 3rem;
            height: 3rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.2s;
        }
        #close-lightbox-btn:hover {
            background: rgba(0, 0, 0, 0.7);
        }
        .lightbox-nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 3rem;
            height: 3rem;
            border: none;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.5);
            color: #fff;
            font-size: 2.25rem;
            line-height: 1;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        .lightbox-nav-btn:hover { background: rgba(0, 0, 0, 0.8); }
        #lightbox-prev-btn { left: 1rem; }
        #lightbox-next-btn { right: 1rem; }
        #lightbox-counter {
            position: absolute;
            bottom: 1.25rem;
            left: 50%;
            transform: translateX(-50%);
            color: #d1d5db;
            font-size: 0.85rem;
            letter-spacing: 0.05em;
            display: none;
        }

        @media (max-width: 640px) {
            .modal {
                padding: 0.4rem;
                align-items: flex-end;
            }
            .modal-content-wrapper {
                max-height: calc(100vh - 0.8rem);
                max-height: calc(100dvh - 0.8rem);
            }
            .modal-content {
                padding: 0.75rem 0.7rem 0.55rem;
            }
            .modal-footer {
                flex-direction: column;
            }
            .card-btn {
                font-size: 0.75rem;
                padding: 0.5rem 0.55rem;
            }
            .btn-approve { min-width: 4.6rem; }
            .btn-deny { min-width: 3.8rem; }
        }

        .analytics-note {
            margin: 0 0 0.55rem;
            color: #6b7280;
            font-size: 0.75rem;
            line-height: 1.35;
        }
        .analytics-heading {
            margin: 1rem 0 0.35rem;
            color: #fff;
            font-size: 0.95rem;
            font-weight: 600;
        }
        .analytics-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.5rem;
        }
        @media (min-width: 860px) {
            .analytics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
        }
        .analytics-card {
            background: #1c1f2a;
            border: 1px solid #2a2e3a;
            border-radius: 0.75rem;
            padding: 0.7rem 0.75rem;
            min-width: 0;
        }
        .analytics-card strong {
            display: block;
            color: #fff;
            font-size: 1.35rem;
            font-variant-numeric: tabular-nums;
            letter-spacing: -0.02em;
        }
        .analytics-card span {
            display: block;
            margin-top: 0.15rem;
            color: #9ca3af;
            font-size: 0.72rem;
            line-height: 1.3;
        }
        .analytics-section-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            margin: 1rem 0 0.35rem;
        }
        .analytics-section-head .analytics-heading { margin: 0; }
        .analytics-see-more {
            flex: 0 0 auto;
            color: #d6b25e;
            font-size: 0.8rem;
            font-weight: 600;
            text-decoration: none;
        }
        .analytics-pages {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
            margin: 0.85rem 0 1.25rem;
        }
        .analytics-page {
            padding: 0.45rem 0.7rem;
            border-radius: 0.65rem;
            border: 1px solid #2c3140;
            background: #1c1f2a;
            color: #d6b25e;
            font-size: 0.78rem;
            font-weight: 600;
            text-decoration: none;
        }
        .analytics-page.is-active {
            border-color: #d6b25e;
            color: #fff;
        }
        .analytics-back {
            display: inline-block;
            margin: 0 0 0.65rem;
            padding: 0.45rem 0.7rem;
            border-radius: 0.65rem;
            border: 1px solid #2c3140;
            background: #1c1f2a;
            color: #d6b25e;
            font-size: 0.78rem;
            font-weight: 600;
            text-decoration: none;
        }
        .analytics-pages .analytics-back { margin: 0; }
        .analytics-table-wrap {
            overflow-x: auto;
            border: 1px solid #2a2e3a;
            border-radius: 0.75rem;
            background: #1c1f2a;
        }
        .analytics-table {
            width: 100%;
            border-collapse: collapse;
            min-width: 36rem;
        }
        .analytics-table th,
        .analytics-table td {
            padding: 0.55rem 0.7rem;
            text-align: left;
            font-size: 0.8rem;
            border-bottom: 1px solid #2a2e3a;
            white-space: nowrap;
        }
        .analytics-table th {
            position: sticky;
            top: 0;
            z-index: 1;
            background: #1c1f2a;
            color: #9ca3af;
            font-weight: 600;
            font-size: 0.72rem;
        }
        .analytics-table td { color: #e5e7eb; }
        .analytics-table tr:last-child td { border-bottom: none; }
        .analytics-empty,
        .analytics-scroll-status {
            margin: 0.35rem 0 0;
            color: #6b7280;
            font-size: 0.8rem;
        }
        #analytics-error {
            color: #f87171;
            font-size: 0.85rem;
        }
        .analytics-sub {
            display: block;
            margin-top: 0.1rem;
            color: #6b7280;
            font-size: 0.68rem;
            font-weight: 500;
        }
        .analytics-member {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            min-width: 0;
        }
        .analytics-avatar {
            width: 1.65rem;
            height: 1.65rem;
            border-radius: 9999px;
            object-fit: cover;
            flex-shrink: 0;
        }
        .analytics-table td.analytics-wrap { white-space: normal; }
        .analytics-error-text { margin: 0 0 0.55rem; }
        .analytics-retry {
            padding: 0.5rem 0.85rem;
            border-radius: 0.65rem;
            border: 1px solid #2c3140;
            background: #1c1f2a;
            color: #d6b25e;
            font-size: 0.8rem;
            font-weight: 600;
        }
        .analytics-more {
            display: block;
            width: 100%;
            margin-top: 0.45rem;
            padding: 0.55rem 0.7rem;
            border-radius: 0.65rem;
            border: 1px solid #2c3140;
            background: #1c1f2a;
            color: #d6b25e;
            font-size: 0.8rem;
            font-weight: 600;
        }
        .analytics-panel-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 0.75rem;
            margin-top: 0.75rem;
        }
        .analytics-panel {
            background: #1c1f2a;
            border: 1px solid #2a2e3a;
            border-radius: 0.85rem;
            padding: 0.9rem;
            min-width: 0;
        }
        .analytics-panel .analytics-heading { margin: 0 0 0.65rem; }
        .analytics-panel .analytics-note { margin: 0.7rem 0 0; }
        .analytics-headline { margin-bottom: 0.75rem; }
        .analytics-headline strong {
            display: block;
            color: #fff;
            font-size: 1.85rem;
            font-variant-numeric: tabular-nums;
            letter-spacing: -0.03em;
            line-height: 1;
        }
        .analytics-headline span {
            display: block;
            margin-top: 0.25rem;
            color: #9ca3af;
            font-size: 0.75rem;
        }
        .analytics-bars,
        .analytics-nested {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
        }
        .analytics-bar-label,
        .analytics-rank-top {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            gap: 0.75rem;
            color: #9ca3af;
            font-size: 0.75rem;
        }
        .analytics-bar-label strong,
        .analytics-rank-top strong {
            color: #fff;
            font-size: 0.82rem;
            font-variant-numeric: tabular-nums;
        }
        .analytics-bar-track {
            height: 0.45rem;
            border-radius: 999px;
            background: #2a2e3a;
            overflow: hidden;
        }
        .analytics-bar-fill {
            height: 100%;
            border-radius: 999px;
            background: #d6b25e;
        }
        .analytics-nested-track {
            position: relative;
            height: 0.7rem;
            margin-top: 0.15rem;
        }
        .analytics-nested-track .analytics-bar-fill {
            position: absolute;
            left: 0;
            top: 0;
        }
        .analytics-bar-fill-outer { background: #5c4a2e; }
        .analytics-bar-fill-inner { background: #d6b25e; }
        .analytics-split { margin: 0.15rem 0 0.75rem; }
        .analytics-split-track {
            display: flex;
            height: 0.7rem;
            border-radius: 999px;
            overflow: hidden;
            background: #2a2e3a;
        }
        .analytics-split-seg { height: 100%; }
        .analytics-tone-gold { background: #d6b25e; }
        .analytics-tone-gold-2 { background: #f0ddb0; }
        .analytics-tone-gold-3 { background: #8d7340; }
        .analytics-tone-muted { background: #4b5563; }
        .analytics-swatch {
            width: 0.5rem;
            height: 0.5rem;
            border-radius: 999px;
            display: inline-block;
            flex: 0 0 auto;
        }
        .analytics-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem 0.8rem;
            margin-top: 0.5rem;
        }
        .analytics-legend-item {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            color: #9ca3af;
            font-size: 0.72rem;
            line-height: 1.3;
        }
        .analytics-legend-item strong {
            color: #fff;
            font-variant-numeric: tabular-nums;
        }
        .analytics-figure {
            display: flex;
            justify-content: space-between;
            gap: 0.75rem;
            margin: 0.7rem 0 0;
            color: #9ca3af;
            font-size: 0.75rem;
        }
        .analytics-figure strong {
            color: #fff;
            font-variant-numeric: tabular-nums;
        }
        .analytics-figures {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            margin-top: 0.7rem;
        }
        .analytics-figures .analytics-figure { margin: 0; }
        .analytics-rank {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            padding: 0.85rem;
            border: 1px solid #2a2e3a;
            border-radius: 0.85rem;
            background: #1c1f2a;
        }
        .analytics-rank-name {
            min-width: 0;
            color: #e5e7eb;
            font-size: 0.82rem;
        }
        .analytics-pair {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 0.25rem 1rem;
        }
        .analytics-feed {
            border: 1px solid #2a2e3a;
            border-radius: 0.85rem;
            background: #1c1f2a;
            overflow: hidden;
        }
        .analytics-feed-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 0.75rem;
            padding: 0.65rem 0.8rem;
            border-bottom: 1px solid #2a2e3a;
        }
        .analytics-feed-row:last-child { border-bottom: none; }
        .analytics-feed-main {
            min-width: 0;
            margin: 0;
            color: #e5e7eb;
            font-size: 0.82rem;
            line-height: 1.35;
        }
        .analytics-feed-meta {
            flex: 0 0 auto;
            color: #9ca3af;
            font-size: 0.72rem;
            text-align: right;
        }
        .analytics-feed-stats {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem 0.75rem;
            justify-content: flex-end;
        }
        .analytics-feed-stats span { color: #9ca3af; font-size: 0.72rem; }
        .analytics-feed-stats strong { color: #fff; font-variant-numeric: tabular-nums; }
        @media (min-width: 960px) {
            .analytics-panel-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
            .analytics-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
        }
        @media (max-width: 640px) {
            .analytics-feed-row { align-items: flex-start; flex-wrap: wrap; }
            .analytics-feed-meta,
            .analytics-feed-stats { text-align: left; justify-content: flex-start; }
        }

        .settings-stack {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
            max-width: 36rem;
        }
        .settings-panel {
            max-width: 36rem;
            background: #1c1f2a;
            border: 1px solid #2a2e3a;
            border-radius: 0.85rem;
            padding: 0.95rem;
        }
        .settings-stack .settings-panel {
            max-width: none;
        }
        .settings-check {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            margin-top: 0.85rem;
            color: #e5e7eb;
            font-size: 0.82rem;
            font-weight: 600;
        }
        .settings-check input {
            width: 1rem;
            height: 1rem;
            accent-color: #d6b25e;
        }
        .settings-panel h2 {
            margin: 0 0 0.35rem;
            color: #fff;
            font-size: 1rem;
            font-weight: 600;
        }
        .settings-source,
        .settings-changed,
        .settings-unsaved,
        .settings-message {
            margin: 0.35rem 0 0;
            color: #9ca3af;
            font-size: 0.78rem;
            line-height: 1.4;
        }
        .settings-unsaved { color: #d6b25e; }
        .settings-message.is-error { color: #f87171; }
        .settings-message.is-ok { color: #86efac; }
        .settings-field {
            display: flex;
            flex-direction: column;
            gap: 0.28rem;
            margin-top: 0.85rem;
        }
        .settings-field span {
            color: #e5e7eb;
            font-size: 0.82rem;
            font-weight: 600;
        }
        .settings-field input {
            width: 100%;
            padding: 0.6rem 0.75rem;
            background: #111317;
            border: 1px solid #2c3140;
            border-radius: 0.65rem;
            color: #e5e7eb;
            font-size: 0.9rem;
        }
        .settings-field input:focus {
            outline: none;
            border-color: #d6b25e;
        }
        .settings-help {
            color: #6b7280;
            font-size: 0.75rem;
            font-weight: 500;
            line-height: 1.35;
        }
        .settings-preview {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
            margin-top: 1rem;
            padding-top: 0.85rem;
            border-top: 1px solid #2a2e3a;
        }
        .settings-preview p {
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
            margin: 0;
        }
        .settings-preview strong {
            color: #fff;
            font-size: 0.84rem;
            font-variant-numeric: tabular-nums;
        }
        .settings-preview span {
            color: #9ca3af;
            font-size: 0.75rem;
        }
        .settings-save {
            margin-top: 0.9rem;
            padding: 0.55rem 0.9rem;
            border-radius: 0.65rem;
            border: 1px solid #d6b25e;
            background: #d6b25e;
            color: #111317;
            font-size: 0.82rem;
            font-weight: 700;
        }
        .settings-save:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }
        .settings-confirm {
            position: fixed;
            inset: 0;
            z-index: 80;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            background: rgba(0, 0, 0, 0.72);
        }
        .settings-confirm[hidden] { display: none; }
        .settings-confirm-card {
            width: min(100%, 28rem);
            background: #1c1f2a;
            border: 1px solid #3a3f4b;
            border-radius: 0.85rem;
            padding: 1rem;
        }
        .settings-confirm-card h2 {
            margin: 0;
            color: #fff;
            font-size: 1.05rem;
        }
        .settings-confirm-card p {
            margin: 0.7rem 0 0;
            color: #d1d5db;
            font-size: 0.86rem;
            line-height: 1.45;
            white-space: pre-line;
        }
        .settings-confirm-actions {
            display: flex;
            justify-content: flex-end;
            gap: 0.45rem;
            margin-top: 1rem;
        }
        .settings-confirm-actions button {
            padding: 0.5rem 0.75rem;
            border-radius: 0.6rem;
            border: 1px solid #3a3f4b;
            background: transparent;
            color: #e5e7eb;
            font-size: 0.8rem;
            font-weight: 600;
        }
        #force-confirm {
            background: #ffffff;
            border-color: #ffffff;
            color: #111317;
        }
        .settings-confirm-actions button:disabled { opacity: 0.5; cursor: not-allowed; }

        .preapproved-add {
            margin-bottom: 0.85rem;
        }
        .preapproved-counts {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.45rem;
            margin-bottom: 0.85rem;
        }
        .preapproved-count {
            background: #1c1f2a;
            border: 1px solid #2a2e3a;
            border-radius: 0.75rem;
            padding: 0.65rem 0.75rem;
        }
        .preapproved-count strong {
            display: block;
            color: #fff;
            font-size: 1.15rem;
            font-variant-numeric: tabular-nums;
        }
        .preapproved-count span {
            color: #9ca3af;
            font-size: 0.72rem;
            font-weight: 600;
        }
        .preapproved-notice {
            margin: 0 0 0.75rem;
            font-size: 0.82rem;
            line-height: 1.4;
        }
        .preapproved-notice.is-error { color: #f87171; }
        .preapproved-notice.is-ok { color: #86efac; }
        .status-waiting { background: #5c4a2e; color: #f0ddb0; }
        .preapproved-form-card { width: min(100%, 32rem); }
        .photo-picker {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-top: 0.85rem;
        }
        .photo-picker img,
        .photo-placeholder {
            width: 3.4rem;
            height: 3.4rem;
            border-radius: 9999px;
            object-fit: cover;
            flex-shrink: 0;
        }
        .photo-placeholder {
            display: grid;
            place-items: center;
            background: #111317;
            border: 1px solid #2c3140;
            color: #9ca3af;
            font-size: 0.72rem;
            font-weight: 600;
        }
        .card-avatar.photo-placeholder {
            width: 2.75rem;
            height: 2.75rem;
            font-size: 0.85rem;
        }
        .photo-picker-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        .photo-picker-actions button {
            padding: 0.4rem 0.65rem;
            border-radius: 0.55rem;
            border: 1px solid #3a3f4b;
            color: #e5e7eb;
            font-size: 0.75rem;
            font-weight: 600;
        }
        #revoke-confirm {
            background: #d64545;
            border-color: #d64545;
            color: #fff;
        }
        .card-btn:disabled { opacity: 0.55; cursor: not-allowed; }
        .screen-capture-panel {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
        }
        .screen-capture-toggle {
            position: relative;
            display: flex;
            align-items: center;
            gap: 0.85rem;
            margin: 0;
            cursor: pointer;
        }
        .screen-capture-panel.is-busy .screen-capture-toggle {
            cursor: wait;
        }
        .screen-capture-toggle input {
            position: absolute;
            width: 1px;
            height: 1px;
            margin: 0;
            padding: 0;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
            appearance: none;
        }
        .screen-capture-switch {
            position: relative;
            display: block;
            order: 2;
            flex: 0 0 auto;
            width: 2.6rem;
            height: 1.5rem;
            border-radius: 999px;
            background: #3a3f4b;
            transition: background 0.15s ease;
        }
        .screen-capture-switch::after {
            content: "";
            position: absolute;
            top: 0.16rem;
            left: 0.16rem;
            width: 1.18rem;
            height: 1.18rem;
            border-radius: 50%;
            background: #fff;
            transition: transform 0.15s ease;
        }
        .screen-capture-panel.is-on .screen-capture-switch,
        .screen-capture-toggle input:checked + .screen-capture-switch {
            background: #3d8bfd;
        }
        .screen-capture-panel.is-on .screen-capture-switch::after,
        .screen-capture-toggle input:checked + .screen-capture-switch::after {
            transform: translateX(1.1rem);
        }
        .screen-capture-toggle input:focus-visible + .screen-capture-switch {
            outline: 2px solid #93c5fd;
            outline-offset: 2px;
        }
        .screen-capture-panel.is-busy .screen-capture-switch {
            opacity: 0.6;
        }
        .screen-capture-copy {
            display: flex;
            flex: 1;
            flex-direction: column;
            gap: 0.15rem;
            min-width: 0;
            order: 1;
        }
        .screen-capture-title {
            color: #f3f4f6;
            font-size: 0.92rem;
            font-weight: 600;
        }
        .screen-capture-help,
        .screen-capture-status {
            color: #9ca3af;
            font-size: 0.78rem;
            line-height: 1.35;
        }
        .screen-capture-status:empty {
            display: none;
        }
        .discovery-panel {
            margin-top: 0.35rem;
        }
        .discovery-status {
            margin: 0;
            color: #f3f4f6;
            font-size: 0.82rem;
            font-weight: 600;
            line-height: 1.35;
        }
        .discovery-panel.is-eligible .discovery-status {
            color: #86efac;
        }
        .discovery-note {
            margin: 0.2rem 0 0;
            color: #9ca3af;
            font-size: 0.75rem;
            line-height: 1.4;
        }
        .discovery-note:empty { display: none; }

        .sync-queue-toolbar {
            display: flex;
            justify-content: flex-end;
            margin-bottom: 0.85rem;
        }
        .sync-queue-refresh {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.45rem 0.75rem;
            border-radius: 0.55rem;
            border: 1px solid #3a3f4b;
            background: #14161c;
            color: #e5e7eb;
            font-size: 0.78rem;
            font-weight: 600;
            line-height: 1.2;
            cursor: pointer;
        }
        .sync-queue-refresh:hover {
            background: #1c1f27;
        }
        .sync-queue-refresh-icon {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
        }
        .sync-queue-counts {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0.45rem;
            margin-bottom: 0.85rem;
        }
        .sync-queue-retry {
            margin-top: 0.55rem;
            display: inline-flex;
            align-items: center;
            padding: 0.35rem 0.65rem;
            border-radius: 0.45rem;
            border: 1px solid #7f1d1d;
            background: #3f1212;
            color: #fecaca;
            font-size: 0.75rem;
            font-weight: 650;
            cursor: pointer;
        }
        .sync-queue-retry:hover:not(:disabled) {
            background: #4c1d1d;
        }
        .sync-queue-retry:disabled {
            opacity: 0.6;
            cursor: default;
        }
        .sync-queue-retry-note {
            margin: 0.35rem 0 0;
            color: #fca5a5;
            font-size: 0.75rem;
        }
        .sync-queue-list {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
        }
        .sync-queue-card {
            background: #1c1f2a;
            border: 1px solid #2a2e3a;
            border-radius: 0.75rem;
            padding: 0.75rem 0.85rem;
        }
        .sync-queue-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.6rem;
        }
        .sync-queue-name {
            margin: 0;
            color: #f3f4f6;
            font-size: 0.95rem;
            font-weight: 650;
        }
        .sync-queue-meta,
        .sync-queue-when,
        .sync-queue-error {
            margin: 0.28rem 0 0;
            color: #9ca3af;
            font-size: 0.78rem;
            line-height: 1.4;
        }
        .sync-queue-error { color: #fca5a5; }
        .sync-status-queued { background: #3f3f46; color: #e5e7eb; }
        .sync-status-running { background: #1e3a5f; color: #bfdbfe; }
        .sync-status-success { background: #14532d; color: #bbf7d0; }
        .sync-status-failed { background: #4c1d1d; color: #fecaca; }
        #sync-empty {
            color: #9ca3af;
            font-size: 0.85rem;
        }

        .public-impact > summary { align-items: flex-start; }
        .public-impact > summary::after { margin-top: 0.45rem; }
        .public-impact:not([open]) > :not(summary) { display: none; }
        .pi-face { flex: 1; min-width: 0; display: grid; gap: 0.45rem; }
        .pi-face-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
        .pi-face-title { color: #f8fafc; font-size: 1rem; font-weight: 700; }
        .pi-face-status { color: #E8C998; font-size: 0.78rem; font-weight: 650; white-space: nowrap; }
        .pi-face-clout { display: flex; align-items: baseline; gap: 0.45rem; color: #9ca3af; font-size: 0.75rem; font-weight: 650; }
        .pi-face-clout strong { color: #E8C998; font-size: 1.45rem; font-weight: 700; line-height: 1; }
        .public-impact[open] .pi-face-clout,
        .public-impact[open] .pi-face-scores { display: none; }
        .pi-face-scores { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.35rem; }
        .pi-face-score { min-width: 0; padding: 0.28rem 0.32rem; border: 1px solid #E8C998; border-radius: 0.4rem; background: #14161A; }
        .pi-face-score span { display: block; color: #9ca3af; font-size: 0.62rem; font-weight: 600; line-height: 1.2; }
        .pi-face-score strong { display: block; margin-top: 0.08rem; color: #E8C998; font-size: 0.95rem; font-weight: 700; }
        @media (max-width: 720px) {
            .pi-face-head { flex-wrap: wrap; }
            .pi-face-scores { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        }
        .public-impact-summary {
            margin: 0.15rem 0 0.45rem;
            color: #e5e7eb;
            font-size: 0.82rem;
            line-height: 1.4;
        }
        .public-impact-details summary {
            cursor: pointer;
            color: #E8C998;
            font-size: 0.78rem;
            font-weight: 650;
        }
        .pi-block { margin-top: 0.85rem; }
        .pi-block h5, .pi-block > summary { margin: 0 0 0.35rem; color: #f3f4f6; font-size: 0.82rem; font-weight: 650; }
        .pi-block > summary { cursor: pointer; }
        .pi-note, .pi-meta, .pi-missing { color: #9ca3af; font-size: 0.75rem; line-height: 1.4; }
        .pi-facts { display: grid; gap: 0.35rem; margin: 0.4rem 0 0; }
        .pi-facts div { display: grid; gap: 0.1rem; }
        .pi-facts dt { color: #6b7280; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; }
        .pi-facts dd { margin: 0; color: #e5e7eb; overflow-wrap: anywhere; }
        .pi-facts a, .pi-evidence-list a { color: #E8C998; }
        .pi-status-line { color: #e5e7eb; font-weight: 650; }
        .pi-progress::before {
            content: '';
            display: inline-block;
            width: 0.7rem;
            height: 0.7rem;
            margin-right: 0.35rem;
            border: 2px solid #374151;
            border-top-color: #E8C998;
            border-radius: 50%;
            vertical-align: -0.1rem;
            animation: pi-spin 0.8s linear infinite;
        }
        @keyframes pi-spin { to { transform: rotate(360deg); } }
        .pi-secondary { margin-top: 1.1rem; }
        .pi-identity, .pi-category, .pi-confirm {
            margin-top: 0.55rem;
            padding: 0.55rem 0.65rem;
            border: 1px solid #2a2e3a;
            border-radius: 0.55rem;
            background: #14161A;
        }
        .pi-identity-warning {
            margin-top: 0.45rem;
            padding: 0.6rem 0.7rem;
            border: 1px solid #92400e;
            border-radius: 0.55rem;
            background: #3f2e12;
            color: #FDE68A;
            font-weight: 650;
        }
        .pi-approved { color: #bbf7d0; }
        .pi-preview-banner { color: #E8C998; font-weight: 650; }
        .pi-error { color: #fca5a5; }
        .pi-success { color: #86efac; }
        .pi-evidence-row, .pi-approve-row { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
        .pi-input, .pi-reason {
            width: 100%;
            max-width: 16rem;
            box-sizing: border-box;
            border: 1px solid #374151;
            border-radius: 0.4rem;
            background: #0e1013;
            color: #f3f4f6;
            padding: 0.35rem 0.5rem;
        }
        .pi-reason { max-width: none; margin-top: 0.45rem; }
        .pi-score { max-width: 5.5rem; margin-left: 0.4rem; }
        .pi-button {
            border: 1px solid #374151;
            border-radius: 0.4rem;
            background: #1c1f24;
            color: #f3f4f6;
            font-size: 0.75rem;
            font-weight: 650;
            padding: 0.4rem 0.6rem;
            cursor: pointer;
        }
        .pi-button:hover:not(:disabled) { border-color: #E8C998; }
        .pi-button:disabled { opacity: 0.45; cursor: default; }
        .pi-confidence { margin: 0; color: #f3f4f6; font-size: 1.05rem; font-weight: 700; }
        .pi-identity-alert { border-color: #92400e; background: #3f2e12; }
        .pi-identity-alert .pi-confidence { color: #FDE68A; }
        .pi-fold { margin-top: 0.45rem; }
        .pi-fold summary { cursor: pointer; color: #E8C998; font-size: 0.75rem; font-weight: 650; }
        .pi-overview { margin: 0.45rem 0 0; color: #e5e7eb; font-size: 0.84rem; line-height: 1.45; }
        .pi-manual-lead { margin-top: 0.15rem; }
        .pi-manual-lead h5 { margin: 0; color: #f3f4f6; font-size: 0.82rem; font-weight: 650; }
        .pi-score-string { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-top: 0.45rem; }
        .pi-score-string .pi-input { max-width: none; flex: 1 1 14rem; margin-left: 0; }
        .pi-manual-lead .pi-scoreboard { margin-top: 0.4rem; }
        .pi-manual-lead .pi-approve-row { margin-top: 0.55rem; }
        .pi-scoreboard {
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 0.4rem;
            margin-top: 0.75rem;
        }
        .pi-clout {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            gap: 0.85rem 1.75rem;
            margin: 0.85rem 0 0.55rem;
        }
        .pi-clout-main { flex: 0 0 auto; min-width: 8.5rem; }
        .pi-clout-label { display: block; color: #9ca3af; font-size: 0.75rem; font-weight: 650; letter-spacing: 0.02em; }
        .pi-clout-value { display: block; margin-top: 0.1rem; color: #E8C998; font-size: 2rem; font-weight: 700; line-height: 1; }
        .pi-clout-note { display: block; max-width: 11rem; margin-top: 0.35rem; color: #9ca3af; font-size: 0.75rem; }
        .pi-breakdown { flex: 1 1 32rem; min-width: 0; display: flex; flex-direction: column; gap: 0.45rem; }
        .pi-breakdown-sources, .pi-breakdown-equation { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.4rem; }
        .pi-breakdown-item {
            display: flex;
            flex-direction: column;
            justify-content: center;
            min-width: 5.6rem;
            padding: 0.38rem 0.6rem 0.42rem;
            border: 1px solid #2a2e3a;
            border-radius: 0.45rem;
            background: #14161A;
        }
        .pi-breakdown-label { color: #9ca3af; font-size: 0.68rem; line-height: 1.2; }
        .pi-breakdown-value { margin-top: 0.08rem; color: #e5e7eb; font-size: 0.75rem; font-weight: 650; line-height: 1.1; }
        .pi-breakdown-sources .pi-breakdown-item { min-width: 4.4rem; padding: 0.28rem 0.45rem 0.3rem; }
        .pi-breakdown-total, .pi-breakdown-multiplier, .pi-breakdown-impact { border-color: #E8C998; }
        .pi-breakdown-total .pi-breakdown-value,
        .pi-breakdown-multiplier .pi-breakdown-value,
        .pi-breakdown-impact .pi-breakdown-value { color: #E8C998; font-size: 0.95rem; font-weight: 700; }
        .pi-breakdown-legacy {
            border-style: dashed;
            border-color: #64748b;
            background: transparent;
        }
        .pi-breakdown-legacy .pi-breakdown-label,
        .pi-breakdown-legacy .pi-breakdown-value { color: #94a3b8; font-weight: 550; }
        .pi-breakdown-times { align-self: center; color: #E8C998; font-size: 1.15rem; font-weight: 650; padding: 0 0.1rem; }
        .pi-scoreboard div {
            padding: 0.45rem 0.4rem;
            border: 2px solid #E8C998;
            border-radius: 0.45rem;
            background: #14161A;
        }
        .pi-scoreboard-label { display: block; color: #9ca3af; font-size: 0.68rem; line-height: 1.25; }
        .pi-scoreboard-value { display: block; margin-top: 0.15rem; color: #E8C998; font-size: 1.25rem; font-weight: 700; }
        .pi-scoreboard-input {
            display: block;
            width: 100%;
            max-width: none;
            margin: 0.2rem 0 0;
            padding: 0.1rem 0;
            border: none;
            border-radius: 0;
            background: transparent;
            color: #E8C998;
            font-family: inherit;
            font-size: 1.35rem;
            font-weight: 700;
            line-height: 1.1;
            -moz-appearance: textfield;
            appearance: textfield;
        }
        .pi-scoreboard-input::-webkit-outer-spin-button,
        .pi-scoreboard-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
        .pi-scoreboard-input:focus { outline: none; color: #E8C998; }
        .pi-scoreboard .pi-button { margin-top: 0.35rem; }
        .pi-category-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
        .pi-category-head h5 { margin: 0; }
        .pi-raw-score { color: #E8C998; font-size: 1.35rem; font-weight: 700; line-height: 1; }
        .pi-category h5 { margin-bottom: 0; }
        @media (max-width: 720px) {
            .pi-scoreboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        }
        .pi-badge {
            display: inline-block;
            margin-right: 0.25rem;
            padding: 0.05rem 0.35rem;
            border-radius: 999px;
            background: #1e3a5f;
            color: #bfdbfe;
            font-size: 0.68rem;
        }
        .pi-evidence-list, .pi-block ul { margin: 0.25rem 0 0.4rem; padding-left: 1.1rem; color: #d1d5db; }

        .member-back {
            display: inline-block;
            margin-bottom: 0.35rem;
            color: #E8C998;
            font-size: 0.82rem;
            font-weight: 650;
            text-decoration: none;
        }
        .member-close {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.25rem;
            height: 2.25rem;
            margin-left: auto;
            flex-shrink: 0;
            color: #9ca3af;
            font-size: 1.85rem;
            line-height: 1;
            font-weight: 300;
            text-decoration: none;
        }
        .member-close:hover { color: #fff; }
        body[data-page="member"] .modal {
            position: static;
            display: block;
            background: none;
            padding: 0;
            z-index: auto;
            inset: auto;
        }
        body[data-page="member"] .modal-content-wrapper {
            max-width: none;
            max-height: none;
            overflow: visible;
            transform: none;
            box-shadow: none;
            border: none;
            border-radius: 0;
            background: transparent;
        }
        body[data-page="member"] .modal-content {
            flex: none;
            min-height: auto;
            overflow: visible;
            padding: 0;
        }
        body[data-page="member"] #close-modal-btn { display: none; }

        @media (min-width: 960px) {
            body[data-page="member"] .modal-header {
                display: grid;
                grid-template-columns: auto minmax(0, 1fr) auto;
                align-items: center;
                gap: 0.9rem 1.1rem;
                margin: 0;
                padding: 0.9rem 1.05rem;
                background: #1a1d24;
                border: 1px solid #2e3440;
                border-radius: 0.75rem;
            }
            body[data-page="member"] .modal-avatar {
                width: 4.25rem;
                height: 4.25rem;
            }
            body[data-page="member"] .modal-header h2 { font-size: 1.45rem; }
            body[data-page="member"] .modal-body {
                display: grid;
                grid-template-columns: repeat(3, minmax(0, 1fr));
                grid-template-areas:
                    "profile connections controls"
                    "impact impact impact"
                    "magazine magazine story";
                gap: 0.8rem;
                align-items: start;
            }
            body[data-page="member"] .member-profile,
            body[data-page="member"] .member-connections,
            body[data-page="member"] .member-controls { align-self: stretch; }
            body[data-page="member"] .member-profile { grid-area: profile; }
            body[data-page="member"] .member-connections { grid-area: connections; }
            body[data-page="member"] .member-controls { grid-area: controls; }
            body[data-page="member"] .member-impact { grid-area: impact; }
            body[data-page="member"] .member-story { grid-area: story; }
            body[data-page="member"] .member-magazine { grid-area: magazine; }
            body[data-page="member"] .modal-card {
                border-width: 1px;
                border-color: #2e3440;
            }
            body[data-page="member"] .modal-footer {
                margin-top: 0.8rem;
                padding: 0;
                background: transparent;
                border-radius: 0;
            }
        }
