    @font-face {
        font-family: 'AllianceNo2';
        src: url('Alliance No.2 Regular.otf') format('opentype');
        font-weight: normal;
        font-style: normal;
        font-display: swap;
    }

    @font-face {
        font-family: 'MavenPro';
        src: url('MavenPro-Regular.ttf') format('truetype');
        font-weight: normal;
        font-style: normal;
        font-display: swap;
    }

    :root {
        --primary-bg: #0d0d0d;
        --secondary-bg: #121212;
        --tertiary-bg: #0a0a0a;
        --card-bg: #1a1a1a;
        --border-color: #2a2a2a;
        --text-primary: #e0e0e0;
        --text-secondary: #a0a0a0;
        --text-muted: #777777;
        --accent-light: #ffffff;
        --accent-dark: #8a8a8a;
        --shadow-color: rgba(0, 0, 0, 0.3);
        --highlight: rgba(255, 255, 255, 0.1);
        --glow: rgba(255, 255, 255, 0.05);
        --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
        
        --success: #6bcf7f;
        --success-bg: rgba(107, 207, 127, 0.15);
        --success-border: rgba(107, 207, 127, 0.4);
        --warning: #ffd93d;
        --warning-bg: rgba(255, 217, 61, 0.15);
        --warning-border: rgba(255, 217, 61, 0.4);
        --danger: #ff6b6b;
        --danger-bg: rgba(255, 107, 107, 0.15);
        --info: #4d9de0;
        --info-bg: rgba(77, 157, 224, 0.15);
        
        --panel-bg: rgba(0, 0, 0, 0.18);
        --panel-border: rgba(255, 255, 255, 0.1);
        --panel-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
        --panel-inset: inset 0 1px 0 rgba(255, 255, 255, 0.04);
        
        --btn-primary-bg: linear-gradient(145deg, #ffffff, #e0e0e0);
        --btn-secondary-bg: linear-gradient(145deg, #2a2a2a, #252525);
        --btn-danger-bg: linear-gradient(145deg, #ff4444, #cc0000);
        
        --input-bg: rgba(30, 30, 30, 0.8);
        --input-border: #3a3a3a;
        
        --timeline-note: #6bcf7f;
        --timeline-entity: #4d9de0;
        --timeline-status: #ffd93d;
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        transition:
            background-color 0.3s var(--transition-smooth),
            border-color 0.3s var(--transition-smooth),
            color 0.3s var(--transition-smooth),
            box-shadow 0.3s var(--transition-smooth),
            opacity 0.3s var(--transition-smooth),
            filter 0.3s var(--transition-smooth);
    }

    body {
        background: var(--primary-bg);
        padding: 0;
        margin: 0;
        min-height: 100vh;
        height: 100vh;
        display: flex;
        flex-direction: column;
        font-family: 'MavenPro', 'Segoe UI', system-ui, -apple-system, sans-serif;
        color: var(--text-primary);
        overflow: hidden;
        letter-spacing: 0.2px;
        line-height: 1.6;
    }

    .classification-banner {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 38px;
        background: linear-gradient(120deg, #f44336, #d32f2f);
        color: #fff;
        font-size: 0.85rem;
        font-weight: 600;
        letter-spacing: 1px;
        text-transform: uppercase;
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 1100;
        pointer-events: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    }

    .tab-bar {
        flex-shrink: 0;
    }

    body.classified-active {
        padding-top: 38px;
    }

    .container {
        flex: 1;
        display: flex;
        flex-direction: column;
        background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 50%, var(--tertiary-bg) 100%);
        overflow: hidden;
        width: 100vw;
        min-height: 0;
        height: 100%;
    }

    .container.threats-split {
        grid-template-columns: 1fr 1fr;
    }

    #threatsPanel {
        grid-row: 1 / 4;
    }

    .panel {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 7px;
        padding: 24px;
        box-shadow:
            0 8px 32px var(--shadow-color),
            inset 0 1px 0 rgba(255, 255, 255, 0.03);
        position: relative;
        overflow: hidden;
        flex: 1;
    }

    .panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    }

    .panel:hover {
        border-color: #333;
        box-shadow:
            0 12px 40px var(--shadow-color),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .conva {
        grid-row: 1 / 4;
        overflow: hidden;
        position: relative;
    }

    .container.threats-split .conva {
        grid-column: 1 / 2;
    }

    .container:not(.threats-split) .conva {
        grid-column: 1 / 3;
    }

    .sidebar {
        grid-row: 2 / 4;
        grid-column: 3 / 4;
        overflow-y: auto;
    }

    .sidebar-section {
        margin-bottom: 0;
        padding: 16px;
        background: rgba(30, 30, 30, 0.4);
        border-radius: 7px;
        border: 1px solid var(--border-color);
        transition: all 0.3s ease;
        flex-shrink: 1;
        min-height: 0;
    }

    .sidebar-section:hover {
        background: rgba(35, 35, 35, 0.6);
        border-color: #333;
    }

    .sidebar-section h3 {
        margin-top: 0;
        margin-bottom: 12px;
        color: var(--text-primary);
        font-size: 1rem;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
        font-weight: 600;
        letter-spacing: 0.5px;
    }

    .account-greeting {
        color: var(--text-secondary);
        font-size: 0.95rem;
        margin-bottom: 12px;
        padding: 10px 12px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(20, 20, 20, 0.35);
        line-height: 1.35;
    }

    .tags-container {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 12px;
    }

    .tag {
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(221, 221, 221, 0.9));
        color: #000;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 6px;
        font-weight: 500;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        transition: all 0.2s ease;
    }

    .tag:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    }

    .tag .remove-tag {
        cursor: pointer;
        font-weight: bold;
        opacity: 0;
        transition: all 0.2s ease;
    }

    .tag:hover .remove-tag {
        opacity: 0.6;
    }

    .tag .remove-tag:hover {
        opacity: 1;
        transform: scale(1.2);
    }

    .tags-more-btn {
        background: linear-gradient(145deg, #2a2a2a, #252525);
        border: 1px solid #3a3a3a;
        color: #e8e8e8;
        padding: 8px 14px;
        border-radius: 6px;
        font-size: 0.85rem;
        font-family: inherit;
        cursor: pointer;
        transition: all 0.2s ease;
        width: 100%;
    }

    .tags-more-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
        border-color: #4a4a4a;
        background: linear-gradient(145deg, #2e2e2e, #292929);
    }

    .tags-popup-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        z-index: 5000;
        display: none;
        align-items: center;
        justify-content: center;
    }

    .tags-popup-overlay.active {
        display: flex;
    }

    .tags-popup {
        background: #1a1a1a;
        border: 1px solid #333;
        border-radius: 12px;
        padding: 24px;
        min-width: 300px;
        max-width: 500px;
        max-height: 70vh;
        overflow-y: auto;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    .tags-popup h3 {
        margin: 0 0 16px 0;
        color: #fff;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .tags-popup .close-popup {
        cursor: pointer;
        color: #888;
        font-size: 1.5rem;
        line-height: 1;
    }

    .tags-popup .close-popup:hover {
        color: #fff;
    }

    .tags-popup .popup-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .tags-popup .popup-tag {
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(221, 221, 221, 0.9));
        color: #000;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 6px;
        font-weight: 500;
    }

    .tags-popup .popup-tag .remove-tag {
        cursor: pointer;
        font-weight: bold;
        opacity: 0.6;
        transition: all 0.2s ease;
    }

    .tags-popup .popup-tag .remove-tag:hover {
        opacity: 1;
        transform: scale(1.2);
    }

    .tab-bar {
        display: flex;
        background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(22, 22, 22, 0.95) 100%);
        border: 1px solid var(--border-color);
        padding: 12px 16px;
        margin: 12px;
        margin-bottom: 0;
        height: 68px;
        flex-shrink: 0;
        z-index: 1000;
        position: relative;
        width: calc(100vw - 24px);
        justify-content: flex-start;
        align-items: center;
        border-radius: 7px;
        box-shadow:
            0 4px 20px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
    }

    .tab-bar-info {
        display: flex;
        flex-direction: column;
        color: #fff;
        margin-right: 20px;
        font-size: 0.85rem;
        line-height: 1.2;
        text-align: left;
    }

    .tab-bar-clock {
        font-size: 1rem;
        font-weight: 600;
    }

    .tab-bar-clock small {
        display: block;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.7);
    }

    .tab-bar-extra {
        margin-top: 4px;
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.6);
        letter-spacing: 0.6px;
    }

    #addTabBtn {
        display: none;
    }

    .tab {
        display: none;
    }

    .tab-close {
        margin-left: 10px;
        opacity: 0.5;
        transition: all 0.2s ease;
        font-size: 1rem;
        width: 20px;
        height: 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.05);
    }

    .tab-close:hover {
        opacity: 1;
        background: rgba(255, 100, 100, 0.25);
        transform: scale(1.1);
    }

    .tab-action {
        background: rgba(30, 30, 30, 0.6);
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        padding: 0 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 7px;
        cursor: pointer;
        transition: all 0.2s ease;
        margin-left: 8px;
        height: 43px;
        min-width: 38px;
        width: 50px;
        flex: 0 0 auto;
    }

    .tab-action:hover {
        background: var(--highlight);
        color: var(--text-primary);
        border-color: var(--accent-dark);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .tab-action.active {
        background: rgba(255, 255, 255, 0.15);
        color: #fff;
        border-color: rgba(255, 255, 255, 0.35);
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
    }

    .tab-action.active:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .tab-action i {
        font-size: 1.1rem;
    }

    .logo-card {
        width: 44px;
        height: 44px;
        background: rgba(30, 30, 30, 0.6);
        border: 1px solid var(--border-color);
        border-radius: 7px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 12px;
        flex-shrink: 0;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px var(--shadow-color);
        cursor: pointer;
        position: relative;
        overflow: visible;
    }

    .logo-card:hover {
        background: var(--highlight);
        border-color: var(--accent-dark);
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 8px 20px var(--shadow-color);
    }

    .logo-card img {
        width: 24px;
        height: 24px;
        object-fit: contain;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .logo-card::after {
        content: '';
        position: absolute;
        width: 24px;
        height: 24px;
        background: #fff;
        mask: url('../logo.png') no-repeat center;
        -webkit-mask: url('../logo.png') no-repeat center;
        mask-size: contain;
        -webkit-mask-size: contain;
        transition: transform 0.3s ease;
    }

    .logo-card img.classified {
        display: none;
    }

    .logo-dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        background: linear-gradient(180deg, #1e1e1e 0%, #1a1a1a 100%);
        border: 1px solid var(--border-color);
        border-radius: 7px;
        padding: 8px 0;
        min-width: 180px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(0.95);
        transition: all 0.2s var(--transition-smooth);
        z-index: 1001;
        backdrop-filter: blur(10px);
    }

    .logo-card:hover .logo-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    .logo-dropdown-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 18px;
        cursor: pointer;
        color: var(--text-primary);
        font-size: 0.9rem;
        transition: all 0.2s ease;
        margin: 0 6px;
        border-radius: 8px;
    }

    .logo-dropdown-item:hover {
        background: var(--highlight);
        color: #fff;
        padding-left: 22px;
    }

    .logo-dropdown-item i {
        width: 18px;
        text-align: center;
        font-size: 1rem;
    }

    .tab-action[title] {
        position: relative;
    }

    .tab-action[title]:hover::after {
        content: attr(title);
        position: absolute;
        top: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        background: rgba(25, 25, 25, 0.95);
        color: var(--text-primary);
        padding: 8px 14px;
        border-radius: 8px;
        font-size: 0.85rem;
        white-space: nowrap;
        z-index: 1001;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        border: 1px solid var(--border-color);
        pointer-events: none;
        opacity: 0;
        animation: fadeInTooltip 0.2s ease forwards;
        backdrop-filter: blur(8px);
    }

    .tab-action[title]:hover::before {
        content: "";
        position: absolute;
        top: calc(100% + 4px);
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-bottom-color: rgba(25, 25, 25, 0.95);
        z-index: 1002;
        opacity: 0;
        animation: fadeInTooltip 0.2s ease forwards;
    }

    .tab-bar .tab-action[title]:hover::after {
        right: auto;
        left: 50%;
    }

    .tab-bar .tab-action:last-child[title]:hover::after {
        left: auto;
        right: 0;
        transform: translateX(0);
    }

    .tab-bar .tab-action:last-child[title]:hover::before {
        left: auto;
        right: 14px;
        transform: translateX(0);
    }

    @keyframes fadeInTooltip {
        to {
            opacity: 1;
        }
    }

    .dropdown-menu {
        position: absolute;
        top: 45px;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, var(--card-bg) 0%, var(--secondary-bg) 100%);
        border: 1px solid var(--border-color);
        border-top: none;
        box-shadow: 0 12px 32px var(--shadow-color);
        z-index: 999;
        display: none;
        padding: 20px;
        width: 100%;
        border-radius: 0 0 14px 14px;
        backdrop-filter: blur(10px);
    }

    .dropdown-menu.show {
        display: block;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

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

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

    .dropdown-item {
        background: rgba(30, 30, 30, 0.6);
        border: 1px solid #333;
        border-radius: 7px;
        padding: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: center;
    }

    .dropdown-item:hover {
        background: rgba(45, 45, 45, 0.8);
        border-color: #444;
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .dropdown-item i {
        font-size: 1.6rem;
        margin-bottom: 12px;
        display: block;
        color: var(--text-secondary);
        transition: all 0.3s ease;
    }

    .dropdown-item:hover i {
        color: var(--text-primary);
        transform: scale(1.1);
    }

    .dropdown-item h4 {
        margin: 0 0 8px 0;
        font-size: 1rem;
        color: #ffffff;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
        font-weight: 600;
    }

    .dropdown-item p {
        margin: 0;
        font-size: 0.85rem;
        color: #888;
        line-height: 1.4;
    }

    .tab-content {
        flex: 1;
        display: none;
        padding: 0;
        overflow: hidden;
        height: 100%;
        min-height: 0;
    }

    .tab-content.active {
        display: flex;
        flex-direction: column;
        animation: fadeIn 0.4s ease;
        min-height: 0;
        height: 100%;
    }

    #tracker-tab .tracker-tab {
        flex: 1;
        display: flex;
        min-height: 0;
        padding: 0;
        align-items: stretch;
    }

    #tracker-tab .tracker-panel {
        flex: 1;
        display: flex;
        min-height: 0;
        border-radius: 0;
        overflow: hidden;
        border: none;
        background: #000;
        box-shadow: none;
    }

    .tracker-sidebar {
        width: 300px;
        max-width: 300px;
        background: linear-gradient(180deg, rgba(26, 26, 26, 0.92) 0%, rgba(21, 21, 21, 0.92) 100%);
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        flex-direction: column;
        padding: 16px;
        gap: 12px;
        transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    }

    .tracker-sidebar-header {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .tracker-config-btn {
        align-self: flex-start;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.78);
        padding: 8px 12px;
        border-radius: 10px;
        font-size: 0.78rem;
        cursor: pointer;
        transition: all 0.2s ease;
        font-weight: 800;
        letter-spacing: 0.7px;
        text-transform: uppercase;
    }

    .tracker-config-btn:hover {
        border-color: #3a3a3a;
        color: var(--text-primary);
        background: rgba(255, 255, 255, 0.08);
    }

    .tracker-sidebar.collapsed {
        width: 0;
        padding: 0;
        opacity: 0;
        pointer-events: none;
        border: none;
    }

    .tracker-sidebar-header h3 {
        margin: 0;
        font-size: 0.95rem;
        color: rgba(255, 255, 255, 0.92);
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        font-weight: 900;
        letter-spacing: 1px;
        text-transform: uppercase;
    }

    .tracker-sidebar-header p {
        margin: 4px 0 0;
        color: rgba(255, 255, 255, 0.55);
        font-size: 0.78rem;
    }

    .tracker-sync-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .tracker-sync-actions label {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.62);
        font-weight: 800;
        letter-spacing: 0.8px;
        text-transform: uppercase;
    }

    .tracker-select-row {
        display: flex;
        gap: 10px;
    }

    .tracker-select-row select {
        flex: 1;
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 0;
        color: rgba(255, 255, 255, 0.9);
        padding: 10px 0;
        font-size: 0.9rem;
    }

    .tracker-select-row .btn {
        padding: 9px 12px;
        border-radius: 10px;
        font-size: 0.85rem;
    }

    .tracker-search label {
        display: block;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.62);
        font-weight: 800;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        margin-bottom: 6px;
    }

    .tracker-search input.form-control {
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 0;
        padding: 10px 0;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    }

    .tracker-search input.form-control:focus {
        border-bottom-color: rgba(255, 255, 255, 0.28);
    }

    .tracker-people-list {
        flex: 1;
        overflow-y: auto;
        background: rgba(30, 30, 30, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        padding: 10px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .tracker-location-info {
        background: rgba(30, 30, 30, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        padding: 10px;
        font-size: 0.9rem;
        color: var(--text-muted);
        min-height: 72px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        text-align: left;
        gap: 6px;
    }

    .tracker-location-title {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--text-primary);
        text-align: left;
    }

    .tracker-location-status {
        color: var(--text-muted);
        font-style: italic;
    }

    .tracker-location-meta {
        margin-top: 8px;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .tracker-meta-line {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        font-size: 0.8rem;
        color: var(--text-secondary);
    }

    .tracker-meta-label {
        letter-spacing: 0.6px;
        text-transform: uppercase;
        font-size: 0.7rem;
        color: var(--text-muted);
    }

    .tracker-meta-value {
        color: var(--text-primary);
        font-weight: 600;
        text-align: right;
    }

    .tracker-placeholder {
        text-align: center;
        color: var(--text-muted);
        font-size: 0.9rem;
        padding: 40px 0;
    }

    .tracker-person-item {
        border-radius: 12px;
        border: 1px solid transparent;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.02);
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        transition: border 0.2s ease, background 0.2s ease;
        color: var(--text-primary);
    }

    .tracker-person-count {
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .tracker-person-item:hover {
        border-color: rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.04);
    }

    .tracker-person-item.active {
        border-color: rgba(123, 219, 255, 0.6);
        background: rgba(31, 58, 130, 0.4);
    }

    .tracker-sidebar-footer {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .tracker-map-area {
        flex: 1;
        position: relative;
        min-height: 0;
        background: #000;
        margin-top: 0;
    }

    .tracker-map {
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    /* Shahed tracker map: ultra-contrasty + green tint */
    #trackerMap {
        position: relative;
        overflow: hidden;
        background: #000;
    }

    /* Make map feel like the canvas (no rounded edges) */
    #trackerMap,
    #trackerMap canvas,
    #trackerMap .maplibregl-canvas {
        border-radius: 0 !important;
    }

    /* Apply to both MapLibre and Mapbox canvas classnames (varies by build) */
    #trackerMap.tracker-filter-active .maplibregl-canvas,
    #trackerMap.tracker-filter-active .mapboxgl-canvas,
    #trackerMap.tracker-filter-active canvas {
        -webkit-filter: saturate(0) contrast(900%) brightness(1.15) !important;
        filter: saturate(0) contrast(900%) brightness(1.15) !important;
    }

    #trackerMap.tracker-filter-active::after {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: rgba(0, 255, 110, 0.22);
        mix-blend-mode: color;
        z-index: 1;
    }

    #trackerMap .maplibregl-control-container {
        z-index: 2;
    }

    .tracker-crosshair {
        position: absolute;
        inset: 0;
        pointer-events: none;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 10;
    }

    .tracker-crosshair::before,
    .tracker-crosshair::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(255, 255, 255, 0.2);
    }

    .tracker-crosshair::before {
        width: 60%;
        height: 1px;
    }

    .tracker-crosshair::after {
        width: 1px;
        height: 60%;
    }

    .tracker-crosshair span {
        position: relative;
        width: 72px;
        height: 72px;
        border-radius: 30%;
        border: 1px solid rgba(255, 255, 255, 0.25);
        display: inline-flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.25);
    }

    .tracker-crosshair span::after {
        content: '';
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.8);
    }

    .tracker-map-overlay {
        position: absolute;
        top: 10px;
        left: 10px;
        right: 10px;
        display: flex;
        justify-content: space-between;
        z-index: 20;
        gap: 10px;
        pointer-events: none;
    }

    .tracker-map-overlay-right {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        pointer-events: auto;
    }

    .tracker-map-overlay > * {
        pointer-events: auto;
    }

    .tracker-settings-wrapper {
        position: relative;
        display: inline-flex;
    }

    .tracker-settings-menu {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        width: 260px;
        padding: 12px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        background: rgba(10, 10, 10, 0.9);
        backdrop-filter: blur(10px);
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
        color: var(--text-secondary);
        z-index: 30;
        display: none;
    }

    .tracker-settings-menu.open {
        display: block;
        animation: fadeIn 0.15s ease-out;
    }

    .tracker-settings-item {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(25, 25, 25, 0.7);
    }

    .tracker-settings-row {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        font-size: 0.85rem;
        font-weight: 600;
        color: #ddd;
    }

    .tracker-settings-value {
        font-variant-numeric: tabular-nums;
        color: #ffd93d;
    }

    .tracker-settings-menu input[type="range"] {
        width: 100%;
        accent-color: #ffd93d;
    }

    .tracker-settings-more {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.65);
    }

    .tracker-map-button {
        border-radius: 999px;
        font-size: 0.78rem;
        padding: 8px 12px;
        min-width: 0;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        gap: 6px;
        box-shadow: none;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        font-weight: 800;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    }

    .tracker-map-button.active {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    }

    .tracker-map-button:hover {
        transform: translateY(-1px);
    }

    .tracker-label-toggle {
        border-color: #3a3a3a !important;
        background: linear-gradient(145deg, #2a2a2a, #252525) !important;
        color: var(--text-secondary);
    }

    .tracker-label-toggle.active {
        border-color: #ffd93d !important;
        background: linear-gradient(145deg, #3a3a3a, #2b2b2b) !important;
        color: #ffd93d;
    }

    /* Cleaner, less "UI app" map controls */
    #trackerMap .maplibregl-ctrl-group,
    #trackerMap .mapboxgl-ctrl-group {
        background: rgba(0, 0, 0, 0.55) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-radius: 12px !important;
        box-shadow: none !important;
        overflow: hidden;
    }

    #trackerMap .maplibregl-ctrl-group button,
    #trackerMap .mapboxgl-ctrl-group button {
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.85) !important;
    }

    #trackerMap .maplibregl-ctrl-group button:hover,
    #trackerMap .mapboxgl-ctrl-group button:hover {
        background: rgba(255, 255, 255, 0.08) !important;
    }

    .tracker-debug {
        position: absolute;
        bottom: 12px;
        left: 12px;
        background: linear-gradient(180deg, rgba(26, 26, 26, 0.92) 0%, rgba(21, 21, 21, 0.92) 100%);
        padding: 10px 12px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        font-size: 0.78rem;
        letter-spacing: 0.4px;
        color: rgba(255, 255, 255, 0.75);
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
        z-index: 15;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        text-transform: uppercase;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .workspace {
        flex: 1;
        display: grid;
        gap: 12px;
        grid-template-columns: 1fr 260px;
        grid-template-rows: 1fr auto;
        padding: 12px;
        overflow: hidden;
        min-height: 0;
        max-height: 100%;
        height: 100%;
    }

    .main-panel {
        grid-column: 1;
        grid-row: 1;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 7px;
        padding: 16px;
        box-shadow: 0 8px 32px var(--shadow-color);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: all 0.3s ease;
        max-height: 100%;
        min-height: 0;
        height: 100%;
    }

    .main-panel:hover {
        border-color: #333;
        box-shadow:
            0 12px 40px var(--shadow-color),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .side-panel {
        grid-column: 2;
        grid-row: 1;
        background: linear-gradient(180deg, #1a1a1a 0%, #151515 100%);
        border: 1px solid #222;
        border-radius: 7px;
        padding: 16px;
        box-shadow: 0 8px 32px var(--shadow-color);
        overflow-y: auto;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        gap: 12px;
        max-height: 100%;
        min-height: 0;
        height: 100%;
    }

    .bottom-panel {
        grid-column: 1;
        grid-row: 2;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 7px;
        padding: 20px;
        box-shadow:
            0 8px 32px var(--shadow-color),
            inset 0 1px 0 rgba(255, 255, 255, 0.03);
        min-height: 180px;
        overflow-y: auto;
    }

    .navbar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    }

    .buttons {
        display: flex;
        gap: 12px;
        flex: 1;
    }

    button {
        background: linear-gradient(145deg, #2a2a2a, #252525);
        border: 1px solid #3a3a3a;
        border-radius: 7px;
        padding: 12px 20px;
        color: #e8e8e8;
        cursor: pointer;
        flex: 1;
        text-align: center;
        align-self: stretch;
        font-size: 0.95rem;
        font-weight: 500;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
        letter-spacing: 0.3px;
    }

    button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
        border-color: #4a4a4a;
    }

    button.btn-primary:hover {
        background: linear-gradient(145deg, #ffffff, #e8e8e8);
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
        border-color: rgb(206, 206, 206);
        color: #000;
    }

    button:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .navbtnmargin {
        margin-bottom: 12px;
        margin-top: 12px;
    }

    .logo {
        text-align: left;
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
    }

    .canvas-header {
        padding-bottom: 12px;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
        flex-grow: 0;
    }

    .canvas-header h1 {
        font-size: 1.3rem;
        margin: 0;
        font-weight: 700;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
        background: linear-gradient(
            to right,
            #e0e0e0 0%,
            #ffffff 25%,
            rgba(0, 0, 0, 0.08) 45%,
            rgba(0, 0, 0, 0.08) 55%,
            #ffffff 75%,
            #e0e0e0 100%
        );
        background-size: 300% 100%;
        background-position: 100% 0;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        letter-spacing: 0.5px;
        display: inline-block;
        position: relative;
        transition: background-position 0.6s ease;
    }

    .canvas-header:hover h1 {
        background-position: 0% 0;
    }

    .canvas-header .title-sub {
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--text-muted);
        letter-spacing: 2px;
        margin-left: 10px;
        vertical-align: middle;
    }

    .canvas-header .canvas-version {
        font-size: 0.65rem;
        color: var(--text-muted);
        margin: 4px 0 0 0;
        letter-spacing: 1px;
    }

    .logo h1 {
        font-size: 1.5rem;
        margin: 0;
        background: linear-gradient(90deg, var(--text-secondary), var(--accent-light));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        font-weight: 600;
        letter-spacing: 0.5px;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
    }

    .canvas-title {
        flex: 1;
        min-width: 180px;
    }

    .canvas-title h1 {
        font-size: 1.4rem;
        margin: 0;
        font-weight: 700;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
        background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        letter-spacing: 1px;
        display: flex;
        align-items: baseline;
        gap: 10px;
    }

    .title-sub {
        font-size: 0.85rem;
        font-weight: 500;
        color: var(--text-muted);
        letter-spacing: 2px;
        background: none;
        -webkit-text-fill-color: var(--text-muted);
    }

    .canvas-version {
        font-size: 0.7rem;
        color: var(--text-muted);
        margin: 4px 0 0 0;
        letter-spacing: 1px;
    }

    .canvas-stats {
        display: flex;
        gap: 12px;
    }

    .stat-chip {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        font-size: 0.85rem;
        transition: all 0.2s ease;
    }

    .stat-chip:hover {
        background: rgba(255, 255, 255, 0.06);
        border-color: #3a3a3a;
    }

    .stat-chip i {
        font-size: 0.8rem;
    }

    .stat-chip span {
        font-weight: 600;
        font-size: 1rem;
    }

    .stat-chip small {
        font-size: 0.7rem;
        color: var(--text-muted);
        font-weight: 400;
    }

    .stat-humans i, .stat-humans span {
        color: #6bcf7f;
    }

    .stat-others i, .stat-others span {
        color: #4d9de0;
    }

    .stat-total i, .stat-total span {
        color: #ffd93d;
    }

    .canvas-controls {
        display: flex;
        gap: 8px;
    }

    .control-btn {
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s ease;
        padding: 0;
        flex: none;
    }

    .control-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        color: var(--text-primary);
        border-color: #444;
        transform: translateY(-1px);
    }

    .control-btn:active {
        transform: translateY(0);
    }

    .control-btn.active {
        background: rgba(107, 207, 127, 0.15);
        border-color: #6bcf7f;
        color: #6bcf7f;
    }

    .control-btn i {
        font-size: 0.9rem;
    }

    .web-container {
        position: relative;
        width: 100%;
        flex: 1;
        min-height: 0;
        overflow: hidden;
        cursor: grab;
        border-radius: 8px;
        background: radial-gradient(circle at center, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
        touch-action: none;
        height: 100%;
    }

    .web-container.dragging {
        cursor: grabbing;
        user-select: none;
    }

    .web-content {
        position: absolute;
        width: 5000px;
        height: 5000px;
        transform-origin: 0 0;
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
        transition: none;
    }

    .web-container.dragging .web-content {
        pointer-events: none;
        transition: none !important;
    }

    .web-container.dragging .data-node,
    .web-container.dragging .connection-node,
    .web-container.dragging .graph-node,
    .web-container.dragging .node-label {
        transition: none !important;
    }

    .web-container.dragging .data-node:hover,
    .web-container.dragging .connection-node:hover,
    .web-container.dragging .graph-node:hover {
        transform: none !important;
    }

    .data-node {
        position: absolute;
        width: 64px;
        height: 64px;
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
        border: 2px solid #404040;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow:
            0 0 20px rgba(255, 255, 255, 0.05),
            0 8px 24px rgba(0, 0, 0, 0.5),
            inset 0 1px 2px rgba(255, 255, 255, 0.08);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10;
        font-size: 10px;
        text-align: center;
        padding: 6px;
        word-break: break-word;
        line-height: 1.2;
        will-change: transform;
        backdrop-filter: blur(8px);
    }

    .data-node:hover {
        transform: scale(1.15);
        z-index: 20;
        box-shadow:
            0 8px 24px rgba(255, 255, 255, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.5);
    }

    .data-node.human {
        background: linear-gradient(145deg, #ffffff, #f0f0f0);
        color: #000000;
        box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
    }

    .data-node.human.high-credit {
        background: linear-gradient(145deg, #6bcf7f, #4a9e5c);
        color: #000;
        box-shadow: 0 4px 20px rgba(107, 207, 127, 0.4);
    }

    .data-node.human.medium-credit {
        background: linear-gradient(145deg, #ffd93d, #e6c235);
        color: #000;
        box-shadow: 0 4px 20px rgba(255, 217, 61, 0.4);
    }

    .data-node.human.low-credit {
        background: linear-gradient(145deg, #ff6b6b, #e05555);
        color: #fff;
        box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    }

    .data-node.other {
        background: linear-gradient(145deg, #d0d0d0, #a8a8a8);
        color: #000;
        box-shadow: 0 4px 16px rgba(200, 200, 200, 0.3);
        border: 2px solid rgba(255, 255, 255, 0.2);
    }

    .node-label {
        position: absolute;
        bottom: -32px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(20, 20, 20, 0.95);
        color: #e0e0e0;
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 11px;
        white-space: nowrap;
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
        z-index: 30;
        border: 1px solid #404040;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        font-weight: 500;
        letter-spacing: 0.3px;
    }

    .data-node:hover .node-label {
        opacity: 1;
        transform: translateX(-50%) translateY(-4px);
    }

    .connection-line {
        position: absolute;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.5));
        transform-origin: 0 0;
        z-index: 5;
        will-change: transform;
        transform: translateZ(0);
        height: 2px;
        border-radius: 1px;
    }

    @keyframes pulse {
        0% {
            opacity: 0.4;
        }

        50% {
            opacity: 0.8;
        }

        100% {
            opacity: 0.4;
        }
    }

    .connection-loader {
        border: 3px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        border-top: 3px solid #ffffff;
        width: 40px;
        height: 40px;
        animation: spin 1s linear infinite;
        margin: 20px auto;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    .connection-node {
        position: absolute;
        width: 64px;
        height: 64px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 8px;
        font-size: 10px;
        font-weight: 600;
        cursor: pointer;
        z-index: 10;
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.3),
            inset 0 2px 4px rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.8);
        background: linear-gradient(145deg, #ffffff, #e0e0e0);
        color: #000;
        transition: all 0.3s ease;
    }

    .connection-node:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
    }

    .connection-label {
        position: absolute;
        background: rgba(20, 20, 20, 0.95);
        color: #e0e0e0;
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 11px;
        white-space: nowrap;
        z-index: 15;
        border: 1px solid #404040;
        transform: translate(-50%, -50%);
        font-weight: 500;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .connection-item {
        background: rgba(35, 35, 35, 0.6);
        border: 1px solid #3a3a3a;
        border-radius: 7px;
        padding: 18px;
        margin-bottom: 16px;
        transition: all 0.3s ease;
    }

    .connection-item:hover {
        background: rgba(40, 40, 40, 0.8);
        border-color: #444;
        transform: translateX(4px);
    }

    .connection-item-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }

    .connection-type {
        background: linear-gradient(145deg, #ffffff, #e0e0e0);
        color: #000;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(8px);
        z-index: 1000;
        justify-content: center;
        align-items: center;
        animation: modalFadeIn 0.3s var(--transition-smooth) forwards;
    }

    .modal-content {
        background: linear-gradient(180deg, #1e1e1e 0%, #1a1a1a 100%);
        border: 1px solid var(--panel-border);
        border-radius: 20px;
        padding: 32px;
        width: 95%;
        max-width: 900px;
        max-height: 90vh;
        overflow-y: auto;
        box-shadow:
            0 24px 64px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(255, 255, 255, 0.05);
    }

    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--panel-border);
        flex-shrink: 0;
    }

    .modal.context-modal {
        z-index: 1005 !important;
    }

    .ai-chat-modal~.modal.context-modal {
        z-index: 1005 !important;
    }

    .modal.hiding {
        animation: modalFadeOut 0.3s var(--transition-smooth) forwards;
    }

    .modal:target {
        z-index: 1000;
    }

    .modal.active {
        display: flex;
    }

    .modal-content {
        background: linear-gradient(180deg, #1e1e1e 0%, #1a1a1a 100%);
        border: 1px solid #333;
        border-radius: 20px;
        padding: 32px;
        width: 95%;
        max-width: 900px;
        max-height: 90vh;
        overflow-y: auto;
        box-shadow:
            0 24px 64px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(255, 255, 255, 0.05);
        position: relative;
        display: flex;
        flex-direction: column;
        animation: modalZoomIn 0.3s var(--transition-smooth) forwards;
        transform-origin: center;
    }

    .modal.hiding .modal-content {
        animation: modalZoomOut 0.3s var(--transition-smooth) forwards;
    }

    .modal.classify-modal .modal-content {
        max-width: 520px;
    }

    .about-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.72);
        backdrop-filter: blur(8px);
        z-index: 1006;
        align-items: center;
        justify-content: center;
    }

    .about-overlay.open {
        display: flex;
    }

    .about-card {
        width: min(520px, 92vw);
        background: linear-gradient(180deg, #1e1e1e 0%, #151515 100%);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 18px;
        padding: 22px;
        box-shadow: 0 28px 72px rgba(0, 0, 0, 0.6);
        position: relative;
    }

    .about-close {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.06);
        color: var(--text-primary);
        cursor: pointer;
        font-size: 20px;
        line-height: 1;
    }

    .about-close:hover {
        background: rgba(255, 255, 255, 0.12);
    }

    .about-card h2 {
        margin: 0 0 10px 0;
        font-size: 1.4rem;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
        letter-spacing: 0.3px;
    }

    .about-devnote {
        margin: 0 0 14px 0;
        color: var(--text-secondary);
        line-height: 1.5;
        font-size: 0.95rem;
    }

    .about-links {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 14px;
    }

    .about-links a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.06);
        color: var(--text-primary);
        text-decoration: none;
        font-size: 0.9rem;
        transition: transform 0.15s ease, background 0.15s ease;
    }

    .about-links a:hover {
        background: rgba(255, 255, 255, 0.12);
        transform: translateY(-1px);
    }

    .about-credits {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 14px;
        color: var(--text-secondary);
        font-size: 0.92rem;
        line-height: 1.45;
    }

    .about-credits-title {
        color: var(--text-primary);
        font-weight: 600;
        margin-bottom: 6px;
    }

    .classification-controls {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .classification-preview {
        background: rgba(255, 255, 255, 0.05);
        border: 1px dashed #4d4d4d;
        border-radius: 12px;
        padding: 16px;
        color: #dcdcdc;
        font-size: 0.95rem;
        min-height: 70px;
    }

    .classification-status {
        font-size: 0.95rem;
        color: var(--text-secondary);
        padding: 10px 0 2px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        margin-top: -4px;
    }

    #classificationConfidence {
        width: 100%;
        accent-color: #6bcf7f;
    }

    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        padding-bottom: 20px;
        border-bottom: 1px solid #2c2c2c;
        flex-shrink: 0;
    }

    .modal-header > h2 {
        flex-shrink: 0;
    }

    .modal-header h2 {
        margin: 0;
        font-size: 1.6rem;
        background: linear-gradient(45deg, var(--accent-light), var(--accent-dark));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

    .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 8px 0;
    }

    .modal-form-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        margin-top: 16px;
    }

    .form-section {
        background: rgba(30, 30, 30, 0.5);
        border: 1px solid #2a2a2a;
        border-radius: 16px;
        padding: 24px;
        transition: all 0.3s ease;
    }

    .form-section:hover {
        background: rgba(35, 35, 35, 0.7);
        border-color: #333;
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }

    .form-section h3 {
        margin-top: 0;
        margin-bottom: 20px;
        color: #ffffff;
        font-size: 1.2rem;
        padding-bottom: 12px;
        border-bottom: 1px solid #333;
        display: flex;
        align-items: center;
        gap: 10px;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
        font-weight: 600;
    }

    .form-section h3 i {
        color: rgba(255, 255, 255, 0.8);
        font-size: 1.1rem;
    }

    .form-section .form-group {
        margin-bottom: 20px;
    }

    .form-section .form-group:last-child {
        margin-bottom: 0;
    }

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

    .form-actions-horizontal {
        display: flex;
        gap: 12px;
        justify-content: flex-end;
        margin-top: 32px;
        padding-top: 24px;
        border-top: 1px solid #2c2c2c;
    }

    .btn-enhanced {
        padding: 14px 28px;
        border-radius: 7px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        border: none;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    }

    .btn-enhanced:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .btn-enhanced i {
        font-size: 1.1rem;
    }

    .close {
        background: linear-gradient(145deg, #2a2a2a, #252525);
        border: 1px solid #3a3a3a;
        border-radius: 50%;
        color: #e0e0e0;
        font-size: 1.5rem;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        flex-shrink: 0;
    }

    .close:hover {
        background: linear-gradient(145deg, #ff4444, #cc0000);
        transform: scale(1.1) rotate(90deg);
        box-shadow: 0 6px 16px rgba(255, 68, 68, 0.3);
        border-color: #ff6666;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .quick-action-row {
        display: flex;
        gap: 12px;
        align-items: stretch;
    }

    .quick-action-row .btn-dual {
        flex: 1;
        min-height: 72px;
        border-radius: 7px;
        position: relative;
        overflow: hidden;
        padding: 0 16px;
        font-size: 0.95rem;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        background: var(--accent-light)!important;
        color: #000!important;
        border: 1px solid rgb(206, 206, 206);
    }

    .quick-action-row .btn-dual::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: radial-gradient(circle at 25% 30%, rgba(255, 255, 255, 0.55), transparent 55%);
        opacity: 0;
        transition: opacity 0.4s ease;
    }

    .quick-action-row .btn-dual:hover {
        transform: translateY(-2px);
        box-shadow: 0 1 0px 20px rgba(255, 255, 255, 0.171);
    }

    .quick-action-row .btn-dual:hover::after {
        opacity: 0.7;
    }

    .form-group.compact {
        margin-bottom: 16px;
    }

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: var(--text-secondary);
        font-size: 0.9rem;
        letter-spacing: 0.3px;
    }

    .form-control {
        width: 100%;
        padding: 12px 16px;
        background: rgba(25, 25, 25, 0.8);
        border: 1px solid #333;
        border-radius: 7px;
        color: #e0e0e0;
        font-size: 1rem;
        transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
        font-family: inherit;
    }

    .form-control:focus {
        outline: none;
        border-color: rgba(255, 255, 255, 0.4);
        box-shadow:
            0 0 0 3px rgba(255, 255, 255, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        background: rgba(30, 30, 30, 0.9);
    }

    textarea.form-control {
        min-height: 120px;
        resize: vertical;
        line-height: 1.5;
    }

    select.form-control {
        height: auto;
        padding: 12px 16px;
        cursor: pointer;
    }

    select.form-control[multiple] {
        min-height: 120px;
    }

    .form-actions {
        display: flex;
        gap: 12px;
        justify-content: flex-end;
        margin-top: 32px;
        padding-top: 24px;
        border-top: 1px solid #2c2c2c;
    }

    .form-actions.stacked {
        flex-direction: column;
    }

    .form-actions.stacked .btn {
        width: 100%;
    }

    .btn {
        padding: 12px 24px;
        border-radius: 7px;
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
        border: none;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        letter-spacing: 0.3px;
    }

    .btn-primary {
        background: var(--btn-primary-bg) !important;
        color: #000;
        box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
        border: 1px solid rgb(206, 206, 206);
    }

    .btn-secondary {
        background: var(--btn-secondary-bg);
        border: 1px solid #3a3a3a;
        color: #e8e8e8;
    }

    .btn-danger {
        background: var(--btn-danger-bg);
        color: white;
        box-shadow: 0 4px 16px rgba(255, 68, 68, 0.2);
    }

    .btn-danger:hover {
        background: linear-gradient(145deg, #ff5555, #dd0000);
        box-shadow: 0 6px 20px rgba(255, 85, 85, 0.3);
    }

    .btn-primary:hover {
        background: linear-gradient(145deg, #ffffff, #e8e8e8);
        transform: translateY(-2px);
        color: #000;
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
    }

    .btn-secondary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
        border-color: #4a4a4a;
        background: linear-gradient(145deg, #2e2e2e, #292929);
    }

    .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    .recent-search-chip {
        background: rgba(40, 40, 40, 0.65);
        border: 1px solid #444;
        color: #ddd;
        padding: 10px 14px;
        border-radius: 999px;
        font-size: 0.9rem;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
        white-space: nowrap;
    }

    .recent-search-chip:hover {
        background: rgba(55, 55, 55, 0.75);
        border-color: #555;
        transform: translateY(-1px);
    }

    .detail-view {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(8px);
        z-index: 1000;
        justify-content: center;
        align-items: center;
        animation: modalFadeIn 0.3s var(--transition-smooth) forwards;
    }

    .detail-view.hiding {
        animation: modalFadeOut 0.3s var(--transition-smooth) forwards;
    }

    .detail-content {
        background: linear-gradient(180deg, #1e1e1e 0%, #1a1a1a 100%);
        border: 1px solid #333;
        border-radius: 20px;
        padding: 32px;
        width: 95%;
        max-width: 1000px;
        max-height: 90vh;
        overflow-y: auto;
        box-shadow:
            0 24px 64px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(255, 255, 255, 0.05);
        position: relative;
        display: flex;
        flex-direction: column;
        animation: modalZoomIn 0.3s var(--transition-smooth) forwards;
        transform-origin: center;
    }

    .detail-view.hiding .detail-content {
        animation: modalZoomOut 0.3s var(--transition-smooth) forwards;
    }

    .detail-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        padding-bottom: 20px;
        border-bottom: 1px solid #2c2c2c;
    }

    .detail-header h2 {
        margin: 0;
        font-size: 1.8rem;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
        font-weight: 600;
        background: linear-gradient(90deg, #fff, #ccc);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .detail-body {
        display: grid;
        grid-template-columns: 300px 1fr 1fr;
        gap: 24px;
        flex: 1;
        overflow-y: auto;
        padding: 8px 0;
    }

    .detail-section {
        margin-bottom: 12px;
        background: rgba(30, 30, 30, 0.5);
        border: 1px solid #2a2a2a;
        border-radius: 16px;
        padding: 20px;
        transition: all 0.3s ease;
    }

    .detail-section:hover {
        border-color: #333;
        background: rgba(35, 35, 35, 0.6);
    }

    .profile-section {
        grid-row: 1 / 4;
        display: flex;
        flex-direction: column;
        align-items: center;
        background: rgba(30, 30, 30, 0.6);
        border: 1px solid #333;
        border-radius: 20px;
        padding: 28px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }

    .profile-picture {
        width: 160px;
        height: 160px;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid #404040;
        margin-bottom: 20px;
        background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 3.5rem;
        color: #666;
        box-shadow:
            0 12px 40px rgba(0, 0, 0, 0.4),
            inset 0 2px 4px rgba(255, 255, 255, 0.05);
        transition: all 0.3s ease;
    }

    .profile-picture:hover {
        transform: scale(1.05);
        border-color: #505050;
    }

    .profile-placeholder {
        width: 160px;
        height: 160px;
        border-radius: 50%;
        background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
        border: 3px dashed #444;
        margin-bottom: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #666;
        font-size: 0.9rem;
        text-align: center;
        padding: 12px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
        transition: all 0.3s ease;
    }

    .profile-placeholder:hover {
        border-color: #555;
        color: #888;
    }

    .profile-placeholder i {
        font-size: 2.5rem;
        margin-bottom: 8px;
        color: #fff;
    }

    .profile-name {
        font-size: 1.4rem;
        font-weight: 600;
        margin-bottom: 6px;
        text-align: center;
        color: #ffffff;
        letter-spacing: 0.3px;
    }

    .profile-type {
        font-size: 0.95rem;
        color: #888;
        margin-bottom: 20px;
        text-align: center;
    }

    .profile-stats {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
        margin-top: 16px;
    }

    .stat-item {
        background: rgba(40, 40, 40, 0.6);
        border: 1px solid #333;
        border-radius: 7px;
        padding: 14px;
        text-align: center;
        transition: all 0.3s ease;
    }

    .stat-item:hover {
        background: rgba(45, 45, 45, 0.8);
        transform: translateY(-2px);
    }

    .stat-label {
        font-size: 0.75rem;
        color: #777;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .stat-value {
        font-size: 1.1rem;
        font-weight: 600;
        color: #ffffff;
    }

    .detail-section h3 {
        font-size: 1.1rem;
        margin-bottom: 16px;
        color: #ffffff;
        padding-bottom: 12px;
        border-bottom: 1px solid #333;
        display: flex;
        align-items: center;
        gap: 10px;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
        font-weight: 600;
    }

    .detail-section h3 i {
        color: rgba(255, 255, 255, 0.7);
        font-size: 1rem;
    }

    .detail-item {
        margin-bottom: 14px;
        padding-bottom: 14px;
        border-bottom: 1px solid #2a2a2a;
    }

    .detail-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .detail-label {
        font-weight: 600;
        margin-bottom: 6px;
        color: #888;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .detail-value {
        font-size: 1rem;
        line-height: 1.5;
        color: #e0e0e0;
    }

    .detail-tracker-value {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .detail-tracker-status {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
    }

    .detail-tracker-controls {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        align-items: center;
    }

    .detail-tracker-controls input {
        flex: 1;
        min-width: 180px;
        padding: 10px 14px;
        border-radius: 10px;
        border: 1px solid var(--border-color);
        background: rgba(20, 20, 20, 0.7);
        color: var(--text-primary);
    }

    .detail-tracker-buttons {
        display: flex;
        gap: 8px;
    }

    .detail-tracker-btn {
        font-size: 0.85rem;
        padding: 8px 14px;
        border-radius: 10px;
        border: 1px solid var(--border-color);
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .detail-tracker-btn:hover {
        border-color: #6bcf7f;
        color: #6bcf7f;
        transform: translateY(-1px);
    }

    .tracker-alias-controls {
        display: flex;
        gap: 10px;
    }

    .tracker-alias-controls .form-control {
        flex: 1;
        min-width: 0;
    }

    .detail-image {
        width: 100%;
        max-height: 280px;
        object-fit: contain;
        border-radius: 7px;
        background: #252525;
        padding: 12px;
        border: 1px solid #333;
    }

    .no-image-text {
        color: #666;
        font-style: italic;
        text-align: center;
        padding: 40px 20px;
        background: rgba(30, 30, 30, 0.5);
        border-radius: 7px;
        border: 2px dashed #333;
    }

    .family-graph-container {
        grid-column: 2 / 4;
        margin-top: 20px;
        padding: 24px;
        background: rgba(30, 30, 30, 0.4);
        border-radius: 16px;
        border: 1px solid #2a2a2a;
    }

    .family-graph {
        width: 100%;
        height: 300px;
        position: relative;
        overflow: hidden;
        border-radius: 7px;
        background: radial-gradient(circle at center, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
    }

    .graph-node {
        position: absolute;
        width: 72px;
        height: 72px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 10px;
        font-size: 0.8rem;
        font-weight: 600;
        cursor: pointer;
        z-index: 10;
        box-shadow:
            0 10px 24px rgba(0, 0, 0, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.14);
        background: linear-gradient(145deg, rgba(46, 46, 46, 0.92), rgba(28, 28, 28, 0.92));
        color: #e8e8e8;
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    }

    .graph-node:hover {
        transform: scale(1.07);
        border-color: rgba(255, 255, 255, 0.32);
        box-shadow:
            0 14px 32px rgba(0, 0, 0, 0.45),
            0 0 0 4px rgba(255, 255, 255, 0.06);
    }

    .graph-node-center {
        border: 1px solid rgba(255, 255, 255, 0.22);
        background: linear-gradient(145deg, rgba(60, 60, 60, 0.95), rgba(34, 34, 34, 0.95));
        color: #f2f2f2;
        box-shadow:
            0 16px 34px rgba(0, 0, 0, 0.5),
            0 0 0 4px rgba(255, 255, 255, 0.06);
    }

    .graph-node-member {
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: linear-gradient(145deg, rgba(44, 44, 44, 0.9), rgba(26, 26, 26, 0.9));
        color: #e6e6e6;
    }

    .graph-line {
        position: absolute;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
        transform-origin: 0 0;
        z-index: 5;
        height: 2px;
        border-radius: 1px;
    }

    .detail-actions {
        display: flex;
        gap: 12px;
        justify-content: flex-end;
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid #2c2c2c;
    }

    .btn-action {
        padding: 12px 24px;
        border-radius: 7px;
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
        border: none;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    }

    .btn-action:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

    .btn-action i {
        font-size: 1.1rem;
    }

    .data-persistence-indicator {
        position: fixed;
        bottom: 24px;
        right: 24px;
        background: rgba(25, 25, 25, 0.95);
        border: 1px solid #333;
        border-radius: 24px;
        padding: 12px 18px;
        font-size: 0.85rem;
        color: #888;
        z-index: 1000;
        display: flex;
        align-items: center;
        gap: 10px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(10px);
        font-weight: 500;
    }

    .persistence-status {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #4CAF50;
        box-shadow: 0 0 8px #4CAF50;
    }

    .persistence-status.offline {
        background: #f44336;
        box-shadow: 0 0 8px #f44336;
    }

    .persistence-status.syncing {
        background: #ff9800;
        box-shadow: 0 0 8px #ff9800;
        animation: pulse 1.5s infinite;
    }

    @keyframes pulse {
        0% {
            opacity: 0.4;
        }

        50% {
            opacity: 1;
        }

        100% {
            opacity: 0.4;
        }
    }

    .ai-chat-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(8px);
        z-index: 1001;
        justify-content: center;
        align-items: center;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        animation: modalFadeIn 0.3s var(--transition-smooth) forwards;
    }

    .ai-chat-modal.hiding {
        animation: modalFadeOut 0.3s var(--transition-smooth) forwards;
    }

    .ai-chat-content {
        background: linear-gradient(180deg, #1e1e1e 0%, #1a1a1a 100%);
        border: 1px solid #333;
        border-radius: 20px;
        padding: 0;
        width: 90%;
        max-width: 800px;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
        box-shadow:
            0 24px 64px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(255, 255, 255, 0.05);
        position: relative;
        overflow: hidden;
        animation: modalZoomIn 0.3s var(--transition-smooth) forwards;
        transform-origin: center;
    }

    .ai-chat-modal.hiding .ai-chat-content {
        animation: modalZoomOut 0.3s var(--transition-smooth) forwards;
    }

    .ai-chat-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 24px 28px;
        border-bottom: 1px solid #2c2c2c;
        flex-shrink: 0;
        background: rgba(25, 25, 25, 0.5);
    }

    .ai-chat-header h2 {
        margin: 0;
        font-size: 1.6rem;
        background: linear-gradient(45deg, #ffffff, #cccccc);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
        font-weight: 600;
    }

    .ai-chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 24px 28px;
        background: rgba(20, 20, 20, 0.3);
        margin: 0;
        max-height: 50vh;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        will-change: scroll-position;
    }

    .ai-message {
        margin-bottom: 16px;
        padding: 16px 20px;
        border-radius: 16px;
        max-width: 85%;
        animation: fadeIn 0.3s ease-out;
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
        line-height: 1.5;
        font-size: 0.95rem;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

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

    @keyframes modalFadeIn {
        from {
            opacity: 0;
            backdrop-filter: blur(0px);
        }

        to {
            opacity: 1;
            backdrop-filter: blur(8px);
        }
    }

    @keyframes modalFadeOut {
        from {
            opacity: 1;
            backdrop-filter: blur(8px);
        }

        to {
            opacity: 0;
            backdrop-filter: blur(0px);
        }
    }

    @keyframes modalZoomIn {
        from {
            opacity: 0;
            transform: scale(0.9);
        }

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

    @keyframes modalZoomOut {
        from {
            opacity: 1;
            transform: scale(1);
        }

        to {
            opacity: 0;
            transform: scale(0.9);
        }
    }

    .ai-message.user {
        background: linear-gradient(145deg, #2a2a2a, #252525);
        margin-left: auto;
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        border: 1px solid #333;
    }

    .ai-message.ai {
        background: linear-gradient(145deg, #3a3a3a, #353535);
        margin-right: auto;
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        border: 1px solid #404040;
    }

    .ai-message.system {
        background: linear-gradient(145deg, #252525, #202020);
        margin: 0 auto 20px auto;
        max-width: 100%;
        text-align: left;
        padding: 20px;
        border-radius: 16px;
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        border: 1px solid #2a2a2a;
    }

    .ai-message.system ul {
        text-align: left;
        padding-left: 20px;
        margin: 10px 0;
    }

    .ai-message.system li {
        margin-bottom: 8px;
        text-align: left;
        line-height: 1.5;
    }

    .ai-message.system p {
        margin: 10px 0;
        text-align: left;
    }

    .ai-input-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 24px 28px;
        background: rgba(25, 25, 25, 0.95);
        border-top: 1px solid #2c2c2c;
        border-radius: 20px 20px 0 0;
        flex-shrink: 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }

    .context-display {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        min-height: 56px;
        padding: 12px;
        background: rgba(35, 35, 35, 0.6);
        border: 1px solid #2a2a2a;
        border-radius: 7px;
        max-height: 100px;
        overflow-y: auto;
    }

    .context-card {
        display: flex;
        align-items: center;
        padding: 8px 14px;
        background: linear-gradient(145deg, #2a2a2a, #252525);
        border: 1px solid #333;
        border-radius: 7px;
        font-size: 0.85rem;
        color: #e0e0e0;
        cursor: pointer;
        transition: all 0.2s ease;
        max-width: 200px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .context-card:hover {
        background: linear-gradient(145deg, #353535, #303030);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border-color: #404040;
    }

    .context-card.people {
        border-left: 3px solid #ffffff;
    }

    .context-card.chats {
        border-left: 3px solid #ffffff;
    }

    .context-card.fraud {
        border-left: 3px solid #ffffff;
    }

    .context-card .card-icon {
        margin-right: 8px;
        font-size: 1rem;
    }

    .context-card .card-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 500;
    }

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

    .ai-input {
        flex: 1;
        padding: 14px 18px;
        background: rgba(30, 30, 30, 0.8);
        border: 1px solid #333;
        border-radius: 7px;
        color: #e0e0e0;
        font-size: 1rem;
        transition: all 0.3s ease;
        outline: none;
        font-family: inherit;
    }

    .ai-input:focus {
        outline: none;
        border-color: rgba(255, 255, 255, 0.3);
        box-shadow:
            0 0 0 3px rgba(255, 255, 255, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        background: rgba(35, 35, 35, 0.9);
    }

    .ai-send-btn {
        padding: 0;
        border-radius: 7px;
        width: 188px;
        height: 48px;
        background: linear-gradient(145deg, #ffffff, #e0e0e0);
        color: #000;
        border: none;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.2s ease;
        will-change: transform;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
    }

    .ai-send-btn i {
        font-size: 1.1rem;
        color: #000;
    }

    .ai-send-btn:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
    }

    .ai-send-btn:active {
        transform: translateY(0) scale(1);
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
    }

    .ai-send-btn:disabled {
        background: linear-gradient(145deg, #444, #333);
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    .ai-input-buttons {
        display: flex;
        gap: 8px;
    }


.btncube {
    flex: 0 0 75px;
    min-width: 75px;
    width: 75px;
}


    .btn-icon-text {
        position: absolute;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        font-size: 1.1rem;
        pointer-events: none;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .header-right {
        display: flex;
        gap: 10px;
    }

    .ai-status {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.9rem;
        color: #888;
        font-weight: 500;
    }

    .status-indicator {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #4CAF50;
        box-shadow: 0 0 10px #4CAF50;
        animation: pulse 2s infinite;
    }

    .status-indicator.processing {
        animation: processingPulse 0.8s ease-in-out infinite;
    }

    @keyframes processingPulse {
        0%, 100% { transform: scale(1); opacity: 1; }
        50% { transform: scale(1.3); opacity: 0.8; }
    }

    .ai-message.typing {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 12px 16px;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .typing-indicator {
        display: flex;
        gap: 4px;
    }

    .typing-indicator span {
        width: 8px;
        height: 8px;
        background: #888;
        border-radius: 50%;
        animation: typingBounce 1.4s ease-in-out infinite;
    }

    .typing-indicator span:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing-indicator span:nth-child(3) {
        animation-delay: 0.4s;
    }

    @keyframes typingBounce {
        0%, 60%, 100% { transform: translateY(0); }
        30% { transform: translateY(-6px); }
    }

    .typing-text {
        color: #888;
        font-size: 0.9rem;
        font-style: italic;
    }

    .chat-menu-btn {
        background: linear-gradient(145deg, #2a2a2a, #252525);
        border: 1px solid #333;
        border-radius: 7px;
        padding: 10px;
        color: #e8e8e8;
        cursor: pointer;
        font-size: 1.1rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .chat-menu-btn:hover {
        background: linear-gradient(145deg, #353535, #303030);
        border-color: #404040;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .chat-menu {
        background: rgba(25, 25, 25, 0.95);
        border-bottom: 1px solid #2c2c2c;
        padding: 20px;
        display: none;
    }

    .menu-section {
        margin-bottom: 20px;
    }

    .menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        cursor: pointer;
        border-bottom: 1px solid #2c2c2c;
        margin-bottom: 8px;
        transition: all 0.2s ease;
    }

    .menu-header:hover {
        color: #fff;
    }

    .menu-header h3 {
        margin: 0;
        font-size: 1rem;
        color: #ffffff;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
        font-weight: 600;
    }

    .menu-toggle {
        font-size: 1.2rem;
        font-weight: bold;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(50, 50, 50, 0.6);
        border-radius: 6px;
        transition: all 0.2s ease;
    }

    .menu-content {
        display: none;
        padding: 12px 0;
    }

    .menu-content ul {
        padding-left: 20px;
        margin: 12px 0;
    }

    .menu-content li {
        margin-bottom: 10px;
        line-height: 1.5;
        color: #aaa;
    }

    .menu-btn {
        width: 100%;
        padding: 12px 16px;
        margin-bottom: 8px;
        background: linear-gradient(145deg, #2a2a2a, #252525);
        border: 1px solid #333;
        border-radius: 7px;
        color: #e0e0e0;
        cursor: pointer;
        text-align: left;
        transition: all 0.2s ease;
        font-weight: 500;
    }

    .menu-btn:hover {
        background: linear-gradient(145deg, #353535, #303030);
        transform: translateX(4px);
        border-color: #404040;
    }

    .input-actions {
        display: flex;
        gap: 8px;
        margin-right: 12px;
    }

    .action-btn {
        background: linear-gradient(145deg, #2a2a2a, #252525);
        border: 1px solid #333;
        border-radius: 7px;
        color: #e0e0e0;
        cursor: pointer;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        transition: all 0.2s ease;
    }

    .action-btn:hover {
        background: linear-gradient(145deg, #353535, #303030);
        transform: translateY(-2px);
        border-color: #404040;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .ai-action-btn {
        background: linear-gradient(145deg, #2a2a2a, #252525);
        border: 1px solid #333;
        border-radius: 7px;
        color: #e0e0e0;
        cursor: pointer;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        transition: all 0.2s ease;
        line-height: 1;
    }

    .ai-action-btn:hover {
        background: linear-gradient(145deg, #353535, #303030);
        border-color: #404040;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .ai-action-btn i {
        font-size: 1.1rem;
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    .chat-options-menu {
        position: absolute;
        bottom: 90px;
        right: 28px;
        background: linear-gradient(180deg, #1e1e1e 0%, #1a1a1a 100%);
        border: 1px solid #333;
        border-radius: 7px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
        width: 200px;
        z-index: 1002;
        display: none;
        overflow: hidden;
    }

    .chat-options-menu.active {
        display: block;
        animation: fadeIn 0.2s ease;
    }

    .chat-option {
        padding: 14px 18px;
        border-bottom: 1px solid #2c2c2c;
        cursor: pointer;
        transition: all 0.2s ease;
        color: #e0e0e0;
        display: flex;
        align-items: center;
        font-size: 0.9rem;
        font-weight: 500;
    }

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

    .chat-option:hover {
        background: linear-gradient(145deg, #2a2a2a, #252525);
        padding-left: 22px;
        color: #fff;
    }

    .chat-option i {
        margin-right: 12px;
        width: 20px;
        text-align: center;
        font-size: 1rem;
    }

    .threats-content {
        overflow-y: auto;
        height: calc(100% - 100px);
        padding: 12px;
    }

    .threats-list,
    .fraud-list {
        max-height: 300px;
        overflow-y: auto;
        margin-top: 12px;
    }

    .finding-item {
        background: rgba(35, 35, 35, 0.6);
        border: 1px solid #2a2a2a;
        border-radius: 7px;
        padding: 18px;
        margin-bottom: 16px;
        transition: all 0.3s ease;
    }

    .finding-item:hover {
        background: rgba(40, 40, 40, 0.8);
        border-color: #333;
        transform: translateX(4px);
    }

    .finding-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }

    .finding-name {
        font-weight: 600;
        font-size: 1.1rem;
        color: #fff;
    }

    .finding-risk {
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .finding-high {
        background: linear-gradient(145deg, #ffffff, #e0e0e0);
        color: #000;
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
    }

    .finding-medium {
        background: linear-gradient(145deg, #cccccc, #bbbbbb);
        color: #000;
    }

    .finding-low {
        background: linear-gradient(145deg, #888888, #777777);
        color: #000;
    }

    .finding-evidence {
        font-size: 0.9rem;
        margin: 12px 0;
        color: #aaa;
        line-height: 1.5;
    }

    .finding-reasons {
        font-size: 0.85rem;
        margin-top: 12px;
        color: #888;
    }

    .finding-reasons ul {
        padding-left: 20px;
        margin: 8px 0;
    }

    .finding-reasons li {
        margin-bottom: 6px;
        line-height: 1.4;
    }

    .whitetextnowbruh {
        color: white !important;
    }

    .ai-notification {
        display: none;
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(30, 30, 30, 0.95);
        color: var(--text-primary);
        padding: 12px 24px;
        border-radius: 24px;
        font-size: 0.9rem;
        z-index: 1001;
        animation: fadeInOut 3s ease-in-out;
        border: 1px solid #333;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        font-weight: 500;
        backdrop-filter: blur(10px);
    }

    @keyframes fadeInOut {
        0% {
            opacity: 0;
            bottom: 0px;
            transform: translateX(-50%) scale(0.9);
        }

        10% {
            opacity: 1;
            bottom: 20px;
            transform: translateX(-50%) scale(1);
        }

        90% {
            opacity: 1;
            bottom: 20px;
            transform: translateX(-50%) scale(1);
        }

        100% {
            opacity: 0;
            bottom: 0px;
            transform: translateX(-50%) scale(0.9);
        }
    }

    .glass-effect {
        background: rgba(30, 30, 30, 0.6);
        backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hover-lift {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .hover-lift:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    }

    .text-gradient {
        background: linear-gradient(90deg, var(--text-secondary), var(--accent-light));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .border-glow {
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    /* Scrollbar styling */
    * {
        scrollbar-width: thin;
        scrollbar-color: #333 #1a1a1a;
    }

    *::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    *::-webkit-scrollbar-track {
        background: var(--tertiary-bg, #1a1a1a);
        border-radius: 4px;
    }

    *::-webkit-scrollbar-thumb {
        background: #333;
        border-radius: 4px;
        border: 2px solid var(--tertiary-bg, #1a1a1a);
    }

    *::-webkit-scrollbar-thumb:hover {
        background: #444;
    }

    ::selection {
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
    }

    :focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.3);
        outline-offset: 2px;
    }

    button:disabled,
    .btn:disabled,
    .ai-send-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
        filter: grayscale(0.5);
    }

    .loading-shimmer {
        background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
    }

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

        100% {
            background-position: -200% 0;
        }
    }

    .versiontext {
        font-size: 0.75rem;
        color: #777;
        margin-top: 4px;
        display: block;
    }

    .logo h1 p {
        display: inline-block;
    }

    /* Clean Modal UI */
    .clean-modal {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 9999;
        align-items: center;
        justify-content: center;
    }

    .clean-modal.active {
        display: flex;
        animation: cleanModalFadeIn 0.2s ease;
    }

    .clean-modal-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(4px);
    }

    .clean-modal-content {
        position: relative;
        background: linear-gradient(180deg, #1e1e1e 0%, #1a1a1a 100%);
        border: 1px solid #333;
        border-radius: 16px;
        padding: 28px;
        min-width: 320px;
        max-width: 480px;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
        animation: cleanModalSlideIn 0.25s ease;
    }

    @keyframes cleanModalFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes cleanModalSlideIn {
        from { opacity: 0; transform: translateY(-20px) scale(0.95); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }

    .clean-modal-header {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: 16px;
    }

    .clean-modal-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
    }

    .clean-modal-icon i {
        font-size: 1.3rem;
    }

    .clean-modal-icon.info {
        background: linear-gradient(145deg, #4d9de0, #3a7fc4);
        color: #fff;
    }

    .clean-modal-icon.success {
        background: linear-gradient(145deg, #6bcf7f, #4a9e5c);
        color: #fff;
    }

    .clean-modal-icon.warning {
        background: linear-gradient(145deg, #ffd93d, #e6c235);
        color: #000;
    }

    .clean-modal-icon.error {
        background: linear-gradient(145deg, #ff6b6b, #e05555);
        color: #fff;
    }

    .clean-modal-icon.question {
        background: linear-gradient(145deg, #9b59b6, #7d3c98);
        color: #fff;
    }

    .clean-modal-header h3 {
        margin: 0;
        font-size: 1.25rem;
        color: #fff;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, sans-serif;
        font-weight: 600;
    }

    .clean-modal-body {
        color: #bbb;
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 24px;
        white-space: pre-wrap;
    }

    .clean-modal-actions {
        display: flex;
        gap: 12px;
        justify-content: flex-end;
    }

    .clean-modal-actions button {
        padding: 10px 20px;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        border: none;
        transition: all 0.2s ease;
    }

    .clean-modal-btn {
        background: linear-gradient(145deg, #2a2a2a, #252525);
        border: 1px solid #444 !important;
        color: #e0e0e0;
    }

    .clean-modal-btn:hover {
        background: linear-gradient(145deg, #333, #2a2a2a);
        transform: translateY(-1px);
    }

    .clean-modal-btn-primary {
        background: linear-gradient(145deg, #ffffff, #e0e0e0) !important;
        color: #000 !important;
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15);
    }

    .clean-modal-btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
    }

    .clean-modal-btn-danger {
        background: linear-gradient(145deg, #ff4444, #cc0000) !important;
        color: #fff !important;
    }

    .clean-modal-btn-danger:hover {
        background: linear-gradient(145deg, #ff5555, #dd0000) !important;
    }

    /* TACTICS alpha popup */
    .tactics-alpha-modal {
        position: fixed;
        inset: 0;
        z-index: 1200;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 16px;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    }

    .tactics-alpha-modal.active {
        display: flex;
    }

    .tactics-alpha-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(8px);
    }

    .tactics-alpha-content {
        position: relative;
        width: min(640px, 100%);
        border-radius: 14px;
        border: 1px solid rgba(255, 74, 74, 0.35);
        background: linear-gradient(145deg, rgba(10, 10, 10, 0.95), rgba(16, 16, 16, 0.92));
        box-shadow: 0 18px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.04);
        padding: 22px;
        text-align: left;
        overflow: hidden;
    }

    .tactics-alpha-content::before {
        content: '';
        position: absolute;
        inset: -2px;
        border-radius: 16px;
        pointer-events: none;
        background: radial-gradient(circle at 20% 20%, rgba(255, 74, 74, 0.18), transparent 55%);
        opacity: 1;
    }

    .tactics-alpha-topline {
        letter-spacing: 1.2px;
        text-transform: uppercase;
        font-weight: 900;
        font-size: 0.8rem;
        color: rgba(255, 160, 160, 0.95);
        margin-bottom: 10px;
    }

    .tactics-alpha-content h2 {
        margin: 0;
        font-size: 1.35rem;
        letter-spacing: 0.8px;
        color: rgba(255, 255, 255, 0.95);
        text-transform: uppercase;
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
    }

    .tactics-alpha-content p {
        margin: 10px 0 0 0;
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .tactics-alpha-actions {
        margin-top: 18px;
    }

    /* Modern Sidebar Styles */
    .side-panel {
        width: 260px;
        min-width: 260px;
        background: linear-gradient(180deg, #1a1a1a 0%, #151515 100%);
        border-left: 1px solid #2a2a2a;
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow-y: auto;
        overflow-x: hidden;
        max-height: 100%;
        min-height: 0;
        flex-shrink: 1;
        height: 100%;
    }

    .sidebar-section.sidebar-mini {
        background: rgba(25, 25, 25, 0.6);
        border: 1px solid #252525;
        border-radius: 10px;
        padding: 14px;
        flex-shrink: 1;
        min-height: 0;
    }

    .sidebar-section.sidebar-mini h3 {
        font-size: 0.9rem;
        font-weight: 600;
        color: #aaa;
        margin: 0 0 12px 0;
    }

    .form-group.compact {
        margin-bottom: 10px;
    }

    .form-group.compact:last-of-type {
        margin-bottom: 0;
    }

    .btn-block {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    /* Threat Detection Cards */
    .threats-card {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 4px 16px var(--shadow-color);
    }

    .threats-card.fraud {
        border-color: rgba(255, 217, 61, 0.3);
    }

    .threats-card-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
    }

    .threats-indicator {
        width: 6px;
        height: 24px;
        background: linear-gradient(to bottom, #ff6b6b, #cc5252);
        border-radius: 3px;
        flex-shrink: 0;
    }

    .threats-card.fraud .threats-indicator {
        background: linear-gradient(to bottom, #ffd93d, #e6c235);
    }

    .threats-card-header h3 {
        margin: 0;
        color: #ffffff;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .btn-full {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
    }

    .threats-list,
    .fraud-list {
        margin-top: 16px;
        max-height: 250px;
        overflow-y: auto;
    }

    .threats-empty {
        text-align: center;
        padding: 24px;
        color: #777;
    }

    .threats-empty p {
        margin: 0;
        font-size: 0.95rem;
    }

    .threats-empty small {
        display: block;
        margin-top: 6px;
        font-size: 0.85rem;
        color: #666;
    }

    .threat-action-card {
        background: rgba(40, 40, 40, 0.6);
        border: 1px solid #333;
        border-radius: 10px;
        padding: 16px;
        margin-bottom: 12px;
    }

    .threat-action-card:last-child {
        margin-bottom: 0;
    }

    .threat-action-card h4 {
        margin: 0 0 8px 0;
        color: #ffffff;
        font-size: 1rem;
    }

    .threat-action-card p {
        font-size: 0.85rem;
        color: #aaa;
        margin: 0 0 12px 0;
    }

    /* Analysis Cards */
    .analysis-card {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 4px 16px var(--shadow-color);
        display: flex;
        flex-direction: column;
    }

    .analysis-card-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
    }

    .analysis-indicator {
        width: 6px;
        height: 24px;
        background: linear-gradient(to bottom, #ffffff, #aaaaaa);
        border-radius: 3px;
        flex-shrink: 0;
    }

    .analysis-card-header h3 {
        margin: 0;
        color: #ffffff;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .analysis-placeholder {
        flex: 1;
        background: rgba(20, 20, 20, 0.5);
        border: 1px dashed #333;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #888;
        padding: 20px;
    }

    .analysis-placeholder p {
        margin: 0;
        font-size: 1rem;
    }

    .analysis-placeholder small {
        margin-top: 6px;
        font-size: 0.85rem;
        color: #666;
    }

    .analysis-stats {
        background: rgba(20, 20, 20, 0.5);
        border-radius: 12px;
        padding: 16px;
        flex: 1;
    }

    .analysis-stats h4 {
        margin: 0 0 12px 0;
        color: #ffffff;
        font-size: 0.95rem;
    }

    .stat-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
        color: #aaa;
    }

    .stat-row:last-child {
        margin-bottom: 0;
    }

    .stat-red {
        color: #ff6b6b;
    }

    .stat-yellow {
        color: #ffd93d;
    }

    .stat-green {
        color: #6bcf7f;
    }

    /* Chat Control Cards */
    .chat-card {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 16px;
        box-shadow: 0 4px 16px var(--shadow-color);
    }

    .chat-card:last-child {
        margin-bottom: 0;
    }

    .chat-card-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
    }

    .chat-indicator {
        width: 6px;
        height: 24px;
        background: linear-gradient(to bottom, #ffffff, #aaaaaa);
        border-radius: 3px;
        flex-shrink: 0;
    }

    .chat-card-header h2,
    .chat-card-header h3 {
        margin: 0;
        color: #ffffff;
    }

    .chat-card-header h2 {
        font-size: 1.3rem;
    }

    .chat-card-header h3 {
        font-size: 1.1rem;
    }

    .chat-stats-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin-top: 16px;
    }

    .chat-stat {
        text-align: center;
        padding: 12px;
        background: rgba(30, 30, 30, 0.5);
        border-radius: 10px;
    }

    .chat-stat-label {
        color: #aaa;
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .chat-stat-value {
        color: #ffffff;
        font-size: 1.3rem;
        font-weight: bold;
    }

    .chats-list {
        margin-top: 12px;
        max-height: 300px;
        overflow-y: auto;
    }

    .chats-empty {
        text-align: center;
        padding: 30px;
        color: #777;
    }

    .chats-empty p {
        margin: 0;
        font-size: 1rem;
    }

    .chats-empty small {
        display: block;
        margin-top: 6px;
        font-size: 0.85rem;
        color: #666;
    }

    .chat-metrics {
        margin-top: 20px;
        padding: 16px;
        background: rgba(30, 30, 30, 0.5);
        border-radius: 10px;
    }

    .chat-metrics h4 {
        margin: 0 0 12px 0;
        color: #ffffff;
        font-size: 0.95rem;
    }

    .metric-row {
        display: flex;
        justify-content: space-between;
        font-size: 0.85rem;
        color: #aaa;
        margin-bottom: 8px;
    }

    .metric-row:last-child {
        margin-bottom: 0;
    }

    .connection-line {
        pointer-events: none;
        will-change: stroke;
    }

    .connection-line[data-type="family"] {
        opacity: 0.8;
        animation: linePulseFamily 2s ease-in-out infinite;
    }

    .connection-line[data-type="friend"] {
        opacity: 0.5;
        animation: linePulseFriend 1.5s ease-in-out infinite;
    }

    @keyframes linePulseFamily {
        0%, 100% { opacity: 0.6; }
        50% { opacity: 0.9; }
    }

    @keyframes linePulseFriend {
        0%, 100% { opacity: 0.3; }
        50% { opacity: 0.6; }
    }

    #connections-svg {
        contain: strict;
        transform-origin: 0 0;
    }

    /* HOJUM (Tactical Proposal Cards) */
    .hojum-stack {
        position: fixed;
        right: 18px;
        bottom: 18px;
        width: min(520px, calc(100vw - 36px));
        display: flex;
        flex-direction: column;
        gap: 12px;
        z-index: 950;
        pointer-events: none;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    }

    .hojum-card {
        pointer-events: auto;
        background: linear-gradient(145deg, rgba(10, 10, 10, 0.95), rgba(18, 18, 18, 0.92));
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-left: 3px solid rgba(255, 74, 74, 0.9);
        border-radius: 10px;
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
        overflow: hidden;
    }

    .hojum-card-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 14px 10px 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.02);
    }

    .hojum-card-title {
        font-size: 0.95rem;
        font-weight: 700;
        letter-spacing: 0.6px;
        color: #f3f3f3;
        text-transform: uppercase;
        line-height: 1.2;
    }

    .hojum-card-meta {
        display: flex;
        gap: 10px;
        align-items: center;
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .hojum-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.04);
        text-transform: uppercase;
        letter-spacing: 0.8px;
        font-size: 0.72rem;
    }

    .hojum-pill.high {
        border-color: rgba(255, 74, 74, 0.55);
        background: rgba(255, 74, 74, 0.08);
        color: rgba(255, 180, 180, 0.95);
    }

    .hojum-pill.medium {
        border-color: rgba(255, 204, 74, 0.45);
        background: rgba(255, 204, 74, 0.08);
        color: rgba(255, 232, 190, 0.95);
    }

    .hojum-pill.low {
        border-color: rgba(90, 255, 160, 0.35);
        background: rgba(90, 255, 160, 0.08);
        color: rgba(205, 255, 228, 0.95);
    }

    .hojum-card-body {
        padding: 12px 14px 14px 14px;
        color: rgba(240, 240, 240, 0.9);
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .hojum-card-body pre {
        margin: 10px 0 0 0;
        padding: 10px 12px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(0, 0, 0, 0.35);
        overflow: auto;
        max-height: 220px;
        font-size: 0.82rem;
        color: rgba(255, 255, 255, 0.86);
    }

    .hojum-card-actions {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        padding: 12px 14px 14px 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(0, 0, 0, 0.25);
    }

    .hojum-btn {
        padding: 10px 14px;
        border-radius: 9px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        background: rgba(255, 255, 255, 0.05);
        color: rgba(255, 255, 255, 0.88);
        cursor: pointer;
        font-weight: 700;
        letter-spacing: 0.6px;
        text-transform: uppercase;
        font-size: 0.78rem;
    }

    .hojum-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.22);
        transform: translateY(-1px);
    }

    .hojum-btn.execute {
        background: linear-gradient(145deg, rgba(255, 74, 74, 0.9), rgba(190, 40, 40, 0.9));
        border-color: rgba(255, 74, 74, 0.55);
        color: #080808;
    }

    .hojum-btn.execute:hover {
        background: linear-gradient(145deg, rgba(255, 92, 92, 0.95), rgba(205, 44, 44, 0.95));
        transform: translateY(-1px);
    }

    .hojum-btn.dismiss {
        opacity: 0.85;
    }

    /* DASTUR list (small, minimal) */
    .dastur-rules-list {
        margin-top: 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-height: 260px;
        overflow: auto;
        padding-right: 4px;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        font-size: 0.82rem;
        color: rgba(255, 255, 255, 0.82);
    }

    .dastur-rule-row {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
        padding: 10px 10px;
        border-radius: 8px;
        border: 1px solid var(--panel-border);
        background: rgba(0, 0, 0, 0.2);
    }

    .dastur-rule-row .meta {
        color: rgba(255, 255, 255, 0.62);
        font-size: 0.75rem;
        margin-top: 4px;
    }

    .dastur-rule-row .controls {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .dastur-mini-btn {
        padding: 6px 9px;
        border-radius: 7px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.85);
        cursor: pointer;
        font-size: 0.72rem;
        letter-spacing: 0.6px;
        text-transform: uppercase;
    }

    .dastur-mini-btn:hover {
        background: rgba(255, 255, 255, 0.07);
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
    }

    .dastur-mini-btn.danger {
        border-color: rgba(255, 74, 74, 0.35);
        background: rgba(255, 74, 74, 0.08);
        color: rgba(255, 205, 205, 0.95);
    }

    /* SARPARAST flash for DASTUR-triggered HOJUM */
    #dashboard-tab.sarparast-alert .main-panel {
        animation: sarparastAlertPulse 0.95s ease-out 1;
        outline: 2px solid rgba(255, 74, 74, 0.55);
        outline-offset: -2px;
    }

    @keyframes sarparastAlertPulse {
        0% { box-shadow: 0 0 0 rgba(255, 74, 74, 0); }
        25% { box-shadow: 0 0 0 3px rgba(255, 74, 74, 0.25); }
        60% { box-shadow: 0 0 0 6px rgba(255, 74, 74, 0.12); }
        100% { box-shadow: 0 0 0 rgba(255, 74, 74, 0); }
    }

    /* TADBIR tab layout (layout only) */
    #tadbir-tab .workspace {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

    #tadbir-tab .main-panel {
        padding: 14px;
    }

    #tadbir-tab .canvas-header {
        margin-bottom: 10px;
    }

    .tactics-layout {
        display: grid;
        grid-template-columns: 320px 1fr 320px;
        gap: 12px;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }

    .tactics-pane {
        border: 1px solid var(--panel-border);
        background: var(--panel-bg);
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
        box-shadow: var(--panel-shadow), var(--panel-inset);
    }

    .tactics-pane-head {
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        background: rgba(255, 255, 255, 0.02);
    }

    .tactics-pane-title {
        font-family: 'AllianceNo2', 'Segoe UI', system-ui, -apple-system, sans-serif;
        font-weight: 700;
        letter-spacing: 0.7px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.92);
        font-size: 0.95rem;
        line-height: 1.1;
    }

    .tactics-pane-sub {
        margin-top: 4px;
        font-size: 0.78rem;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.55);
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    }

    .tactics-pane-body {
        padding: 10px 12px;
        min-height: 0;
    }

    .tactics-pane-scroll {
        overflow: auto;
    }

    .tactics-form-compact {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .tactics-field {
        display: flex;
        flex-direction: column;
    }

    .tactics-input {
        width: 100%;
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        padding: 10px 0;
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.9rem;
        outline: none;
    }

    .tactics-input:focus {
        border-bottom-color: rgba(255, 255, 255, 0.28);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    }

    .tactics-hojum-actions {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .tactics-hojum-actions .btn {
        padding: 8px 12px;
        border-radius: 10px;
        font-size: 0.85rem;
    }

    .tactics-label {
        display: block;
        margin-bottom: 8px;
        font-size: 0.78rem;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.7);
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    }

    .tactics-mono {
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
        letter-spacing: 0;
    }

    .tactics-field-hint {
        margin-top: 8px;
        font-size: 0.82rem;
        color: rgba(255, 255, 255, 0.55);
        line-height: 1.35;
    }

    .tactics-inline-code {
        padding: 2px 8px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(0, 0, 0, 0.25);
        color: rgba(255, 255, 255, 0.75);
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        font-size: 0.78rem;
        letter-spacing: 0.2px;
        white-space: nowrap;
        display: inline-block;
        transform: translateY(-1px);
    }

    .tactics-actions {
        padding-top: 6px;
    }

    .tactics-notes {
        color: rgba(255, 255, 255, 0.65);
        font-size: 0.9rem;
        line-height: 1.55;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    }

    .tactics-notes-box {
        margin-top: 14px;
        border-top: 1px dashed rgba(255, 255, 255, 0.12);
        padding-top: 10px;
    }

    .tactics-notes-box summary {
        cursor: pointer;
        user-select: none;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        font-size: 0.78rem;
        letter-spacing: 0.6px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.7);
    }

    .hojum-recent-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 12px;
        max-height: 360px;
        overflow: auto;
        padding-right: 4px;
    }

    #tadbir-tab .dastur-rules-list {
        max-height: none;
        flex: 1;
        min-height: 0;
        margin-top: 0;
        overflow: visible;
        padding-right: 0;
    }

    #tadbir-tab .hojum-recent-list {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    #tadbir-tab .dastur-rule-row {
        border-radius: 10px;
        background: rgba(20, 20, 20, 0.35);
        border-color: rgba(255, 255, 255, 0.12);
        border-left: 3px solid rgba(255, 255, 255, 0.16);
    }

    #tadbir-tab .dastur-rule-row:hover {
        background: rgba(25, 25, 25, 0.5);
        border-color: rgba(255, 255, 255, 0.16);
        border-left-color: rgba(255, 255, 255, 0.22);
    }

    #tadbir-tab .dastur-rule-row.disabled {
        opacity: 0.65;
        border-left-color: rgba(255, 74, 74, 0.35);
    }

    .hojum-recent-item {
        padding: 10px 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        background: rgba(0, 0, 0, 0.2);
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    }

    .hojum-recent-title {
        letter-spacing: 0.8px;
        text-transform: uppercase;
        font-weight: 800;
        font-size: 0.78rem;
        color: rgba(255, 255, 255, 0.88);
    }

    .hojum-recent-meta {
        margin-top: 6px;
        font-size: 0.76rem;
        color: rgba(255, 255, 255, 0.6);
    }

    /* Case Files Styles */
    .cases-layout {
        display: grid;
        grid-template-columns: 320px 1fr;
        gap: 12px;
        flex: 1;
        min-height: 0;
        overflow: hidden;
        padding: 12px;
    }

    .cases-sidebar {
        grid-column: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: 0;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        box-shadow: 0 4px 16px var(--shadow-color);
        padding: 14px;
    }

    .cases-sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .cases-sidebar-header h2 {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: 0.7px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.92);
    }

    .cases-filters {
        margin-bottom: 12px;
    }

    .cases-filters {
        margin-bottom: 12px;
    }

    .cases-filters select {
        width: 100%;
    }

    .cases-list {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding-right: 4px;
        font-size: 0.82rem;
    }

    .case-new-btn {
        width: 100%;
        padding: 8px 12px;
        margin-top: 12px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 6px;
        color: rgba(255, 255, 255, 0.6);
        cursor: pointer;
        font-size: 0.85rem;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .case-new-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.3);
        color: rgba(255, 255, 255, 0.8);
    }

    .cases-empty {
        text-align: center;
        padding: 40px 20px;
        color: rgba(255, 255, 255, 0.4);
    }

    .cases-empty i {
        font-size: 2.5rem;
        margin-bottom: 12px;
        opacity: 0.3;
    }

    .cases-empty p {
        margin: 0;
        font-size: 0.9rem;
    }

    .cases-empty small {
        color: rgba(255, 255, 255, 0.3);
    }

    .case-card {
        background: rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        padding: 12px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .case-card:hover {
        background: rgba(0, 0, 0, 0.25);
        border-color: rgba(255, 255, 255, 0.15);
    }

    .case-card.active {
        border-color: rgba(255, 255, 255, 0.2);
        background: rgba(0, 0, 0, 0.3);
    }

    .case-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 6px;
    }

    .case-card-title {
        font-weight: 600;
        color: rgba(255, 255, 255, 0.88);
        font-size: 0.9rem;
    }

    .case-card-badge {
        padding: 3px 8px;
        border-radius: 999px;
        font-size: 0.68rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border: 1px solid;
    }

    .case-card-badge.open {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.7);
    }

    .case-card-badge.in-progress {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.7);
    }

    .case-card-badge.closed {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.4);
    }

    .case-card-meta {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.5);
    }

    .cases-main {
        grid-column: 2;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        box-shadow: 0 4px 16px var(--shadow-color);
        padding: 20px;
    }

    .cases-welcome {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.3);
        text-align: center;
    }

    .cases-welcome i {
        font-size: 4rem;
        margin-bottom: 16px;
        opacity: 0.2;
    }

    .cases-welcome h3 {
        margin: 0 0 8px 0;
        color: rgba(255, 255, 255, 0.5);
    }

    .cases-welcome p {
        margin: 0;
        color: rgba(255, 255, 255, 0.3);
    }

    .cases-detail {
        flex: 1;
        display: flex;
        min-height: 0;
        overflow: hidden;
    }

    .case-detail-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .case-detail-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 24px;
        background: rgba(0, 0, 0, 0.2);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        flex-shrink: 0;
    }

    .case-header-left {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .case-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.15);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        color: rgba(255, 255, 255, 0.6);
    }

    .case-header-info h2 {
        margin: 0 0 6px 0;
        font-size: 1.4rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        color: rgba(255, 255, 255, 0.95);
    }

    .case-header-info .case-status-badge {
        margin-left: 0;
    }

    .case-created-at {
        margin: 4px 0 0 0;
        font-size: 0.78rem;
        color: rgba(255, 255, 255, 0.4);
    }

    .case-header-actions {
        display: flex;
        gap: 10px;
    }

    .case-status-badge {
        display: inline-flex;
        padding: 4px 10px;
        border-radius: 999px;
        font-size: 0.72rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border: 1px solid;
    }

    .case-status-badge.open {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.7);
    }

    .case-status-badge.in-progress {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.7);
    }

    .case-status-badge.closed {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.4);
    }

    .case-body {
        flex: 1;
        display: grid;
        grid-template-columns: 320px 1fr;
        gap: 20px;
        overflow: hidden;
    }

    .case-sidebar-panel {
        display: flex;
        flex-direction: column;
        gap: 16px;
        overflow-y: auto;
    }

    .case-stat-card {
        background: rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 10px;
        padding: 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .case-stat-label {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.5);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .case-stat-value {
        font-size: 1.5rem;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.9);
    }

    .case-info-section,
    .case-entities-section {
        background: rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 10px;
        padding: 16px;
    }

    .case-info-section h4,
    .case-entities-section h4,
    .case-timeline-section h4 {
        margin: 0 0 12px 0;
        font-size: 0.85rem;
        font-weight: 700;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.6);
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .case-info-section h4 i,
    .case-entities-section h4 i,
    .case-timeline-section h4 i {
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.8rem;
    }

    .case-description {
        margin: 0;
        color: rgba(255, 255, 255, 0.75);
        line-height: 1.6;
        font-size: 0.9rem;
    }

    .case-section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }

    .case-section-header h4 {
        margin: 0;
    }

    .case-section-header .dastur-mini-btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .case-entities-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-height: 200px;
        overflow-y: auto;
    }

    .case-entity-card {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 6px;
        padding: 10px 12px;
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .case-entity-card:hover {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .case-entity-card i {
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.85rem;
    }

    .case-entity-card span {
        flex: 1;
        color: rgba(255, 255, 255, 0.85);
        font-size: 0.85rem;
    }

    .case-entity-card .remove-entity {
        color: var(--danger);
        cursor: pointer;
        opacity: 0;
        transition: opacity 0.2s;
        font-size: 0.75rem;
    }

    .case-entity-card:hover .remove-entity {
        opacity: 1;
    }

    .case-empty-entities {
        color: rgba(255, 255, 255, 0.35);
        font-style: italic;
        font-size: 0.85rem;
    }

    .case-add-entity-btn {
        width: 100%;
        margin-top: 12px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px dashed rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        color: rgba(255, 255, 255, 0.6);
        cursor: pointer;
        font-size: 0.85rem;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .case-add-entity-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.3);
        color: rgba(255, 255, 255, 0.8);
    }

    .case-main-panel {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .case-timeline-section {
        flex: 1;
        display: flex;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 10px;
        padding: 16px;
        overflow: hidden;
    }

    .case-timeline {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;
        overflow-y: auto;
        margin-bottom: 12px;
        padding-right: 4px;
    }

    .case-timeline-item {
        display: flex;
        gap: 12px;
        padding: 12px;
        background: rgba(0, 0, 0, 0.15);
        border-radius: 6px;
        border-left: 2px solid rgba(255, 255, 255, 0.15);
    }

    .case-timeline-item.note {
        border-left-color: rgba(255, 255, 255, 0.25);
    }

    .case-timeline-item.entity-added {
        border-left-color: rgba(255, 255, 255, 0.2);
    }

    .case-timeline-item.status-changed {
        border-left-color: rgba(255, 255, 255, 0.2);
    }

    .case-timeline-time {
        font-size: 0.72rem;
        color: rgba(255, 255, 255, 0.4);
        min-width: 55px;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        padding-top: 2px;
    }

    .case-timeline-content {
        flex: 1;
        color: rgba(255, 255, 255, 0.75);
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .case-timeline-content strong {
        color: rgba(255, 255, 255, 0.92);
    }

    .case-add-note {
        display: flex;
        gap: 10px;
        flex-shrink: 0;
    }

    .case-add-note .tactics-input {
        flex: 1;
    }

    .case-empty-timeline {
        color: rgba(255, 255, 255, 0.3);
        font-style: italic;
        padding: 20px 0;
        text-align: center;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    /* Hojum Card Colors */
    .hojum-card {
        pointer-events: auto;
        background: linear-gradient(145deg, rgba(10, 10, 10, 0.95), rgba(18, 18, 18, 0.92));
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-left: 3px solid var(--danger);
        border-radius: 10px;
        box-shadow: var(--panel-shadow), var(--panel-inset);
        overflow: hidden;
    }

    .hojum-btn.execute {
        background: linear-gradient(145deg, rgba(255, 74, 74, 0.9), rgba(190, 40, 40, 0.9));
        border-color: rgba(255, 74, 74, 0.55);
        color: #080808;
    }

    .hojum-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.04);
        text-transform: uppercase;
        letter-spacing: 0.8px;
        font-size: 0.72rem;
    }

    .hojum-btn.execute:hover {
        background: linear-gradient(145deg, rgba(255, 92, 92, 0.95), rgba(205, 44, 44, 0.95));
        transform: translateY(-1px);
    }


    /* Case Modal Styles */
    .case-modal .modal-content {
        max-width: 500px;
    }

    .case-modal .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .case-modal .modal-header h2 {
        margin: 0;
    }

    .case-modal .case-close {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        font-size: 1.2rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(60, 60, 60, 0.8);
        border: 1px solid #444;
        color: #ccc;
        cursor: pointer;
        flex-shrink: 0;
        padding: 0;
    }

    .case-modal .case-close:hover {
        background: rgba(80, 80, 80, 0.9);
        color: #fff;
    }

    .case-modal .modal-body .form-group {
        margin-bottom: 16px;
    }

    .case-modal .modal-body label {
        display: block;
        margin-bottom: 6px;
        color: var(--text-primary);
        font-weight: 500;
    }

    .case-modal .form-actions {
        display: flex;
        gap: 10px;
        padding-top: 16px;
        border-top: 1px solid var(--panel-border);
        margin-top: 16px;
    }

    .case-modal .form-actions .btn {
        padding: 10px 20px;
    }

    .entity-picker-list {
        max-height: 300px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .entity-picker-item {
        padding: 12px;
        background: rgba(30, 30, 30, 0.6);
        border: 1px solid var(--panel-border);
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: all 0.2s;
    }

    .entity-picker-item:hover {
        background: rgba(50, 50, 50, 0.6);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .entity-picker-item.selected {
        border-color: var(--success);
        background: rgba(107, 207, 127, 0.1);
    }

    .entity-picker-item i {
        color: var(--success);
    }

    .entity-picker-item.human i {
        color: var(--accent-light);
    }

    .entity-picker-item.other i {
        color: var(--accent-dark);
    }

    .case-bulk-actions {
        display: flex;
        gap: 8px;
        margin-bottom: 12px;
    }

    .case-bulk-actions .dastur-mini-btn {
        flex: 1;
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    /* Settings Modal */
    .settings-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 2000;
        justify-content: center;
        align-items: center;
    }

    .settings-modal.active {
        display: flex;
    }

    .settings-modal-content {
        background: var(--card-bg);
        border: 1px solid var(--panel-border);
        border-radius: 12px;
        padding: 24px;
        width: 400px;
        max-width: 90vw;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    .settings-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--panel-border);
    }

    .settings-header h2 {
        margin: 0;
        color: var(--accent-light);
        font-size: 1.3rem;
    }

    .settings-close {
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 1.5rem;
        cursor: pointer;
        line-height: 1;
        padding: 0;
    }

    .settings-close:hover {
        color: var(--accent-light);
    }

    .settings-body {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .settings-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .settings-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
    }

    .settings-toggle span:first-child {
        color: var(--text-primary);
        font-size: 1rem;
        font-weight: 500;
    }

    .settings-toggle input {
        display: none;
    }

    .toggle-slider {
        width: 48px;
        height: 24px;
        background: #333;
        border-radius: 12px;
        position: relative;
        transition: background 0.3s;
    }

    .toggle-slider::before {
        content: '';
        position: absolute;
        width: 18px;
        height: 18px;
        background: var(--text-muted);
        border-radius: 50%;
        top: 3px;
        left: 3px;
        transition: all 0.3s;
    }

    .settings-toggle input:checked + .toggle-slider {
        background: var(--success);
    }

    .settings-toggle input:checked + .toggle-slider::before {
        left: 27px;
        background: var(--accent-light);
    }

    .settings-desc {
        margin: 0;
        color: var(--text-muted);
        font-size: 0.85rem;
    }

    /* No blur mode */
    body.no-blur .modal,
    body.no-blur .clean-modal,
    body.no-blur .detail-view,
    body.no-blur .ai-chat-modal,
    body.no-blur .introOverlay,
    body.no-blur .hojum-stack {
        backdrop-filter: none !important;
    }

    body.no-blur * {
        backdrop-filter: none !important;
    }

    @media (max-width: 1160px) {
        .tactics-layout {
            grid-template-columns: 1fr;
        }
    }

    /* Intelligence Center Styles */
    .intel-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 4px 16px 4px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 16px;
    }

    .intel-header h2 {
        margin: 0;
        font-size: 1.3rem;
        font-weight: 600;
        color: #fff;
    }

    .intel-header-stats {
        display: flex;
        gap: 20px;
        font-size: 0.85rem;
        color: #888;
    }

    .intel-header-stats span {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .intel-header-stats i {
        color: #666;
    }

    .intel-content {
        flex: 1;
        overflow-y: auto;
        padding: 4px;
    }

    .intel-action-bar {
        display: grid;
        grid-template-columns: 2fr repeat(3, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }

    .intel-action-item {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 14px 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        transition: all 0.2s ease;
    }

    .intel-action-item:hover {
        border-color: #333;
        transform: translateY(-1px);
    }

    .intel-action-primary {
        background: linear-gradient(145deg, rgba(35, 35, 35, 0.95), rgba(28, 28, 28, 0.98));
        border-color: rgba(107, 207, 127, 0.3);
    }

    .intel-action-primary:hover {
        border-color: rgba(107, 207, 127, 0.5);
        box-shadow: 0 4px 20px rgba(107, 207, 127, 0.1);
    }

    .intel-action-top {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .intel-action-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(107, 207, 127, 0.15);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        color: #6bcf7f;
        flex-shrink: 0;
    }

    .intel-action-icon.intel-icon-risk {
        background: rgba(255, 217, 61, 0.15);
        color: #ffd93d;
    }

    .intel-action-icon.intel-icon-connection {
        background: rgba(77, 157, 224, 0.15);
        color: #4d9de0;
    }

    .intel-action-icon.intel-icon-hojum {
        background: rgba(255, 107, 107, 0.15);
        color: #ff6b6b;
    }

    .intel-action-info {
        flex: 1;
        min-width: 0;
    }

    .intel-action-info h3 {
        margin: 0;
        font-size: 0.9rem;
        color: #fff;
        font-weight: 600;
    }

    .intel-action-info p {
        margin: 2px 0 0 0;
        font-size: 0.8rem;
        color: #777;
    }

    .intel-action-info p {
        margin: 0;
        font-size: 0.8rem;
        color: #777;
    }

    .intel-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-bottom: 20px;
    }

    .intel-card {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 4px 16px var(--shadow-color);
        transition: all 0.3s ease;
    }

    .intel-card:hover {
        border-color: #333;
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    }

    .intel-card.intel-primary {
        background: linear-gradient(145deg, rgba(30, 30, 30, 0.9), rgba(25, 25, 25, 0.95));
        border-color: rgba(107, 207, 127, 0.3);
        box-shadow: 0 4px 20px rgba(107, 207, 127, 0.1);
    }

    .intel-card-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
    }

    .intel-indicator {
        width: 6px;
        height: 24px;
        border-radius: 3px;
        flex-shrink: 0;
    }

    .intel-indicator-ai {
        background: linear-gradient(to bottom, #6bcf7f, #4a9e5c);
    }

    .intel-indicator-risk {
        background: linear-gradient(to bottom, #ffd93d, #e6c235);
    }

    .intel-indicator-connection {
        background: linear-gradient(to bottom, #4d9de0, #3a7fc4);
    }

    .intel-indicator-hojum {
        background: linear-gradient(to bottom, #ff6b6b, #cc5252);
    }

    .intel-card-header h3 {
        margin: 0;
        color: #ffffff;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .intel-card-desc {
        color: #aaa;
        font-size: 0.9rem;
        line-height: 1.5;
        margin: 0 0 16px 0;
    }

    .intel-card-actions {
        display: flex;
        gap: 12px;
    }

    .intel-card-hint {
        margin-top: 12px;
        padding: 10px 12px;
        background: rgba(107, 207, 127, 0.1);
        border: 1px solid rgba(107, 207, 127, 0.2);
        border-radius: 8px;
        color: #6bcf7f;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .intel-card-hint i {
        flex-shrink: 0;
    }

    .intel-risk-chart {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .intel-risk-row {
        display: grid;
        grid-template-columns: 100px 1fr 50px;
        align-items: center;
        gap: 12px;
    }

    .intel-risk-label {
        color: #aaa;
        font-size: 0.9rem;
    }

    .intel-risk-bar {
        height: 8px;
        background: rgba(30, 30, 30, 0.5);
        border-radius: 4px;
        overflow: hidden;
    }

    .intel-risk-fill {
        height: 100%;
        border-radius: 4px;
        transition: width 0.5s ease;
    }

    .intel-risk-high {
        background: linear-gradient(90deg, #ff6b6b, #ff4757);
    }

    .intel-risk-medium {
        background: linear-gradient(90deg, #ffd93d, #ffb142);
    }

    .intel-risk-low {
        background: linear-gradient(90deg, #6bcf7f, #4a9e5c);
    }

    .intel-risk-value {
        font-weight: 600;
        font-size: 0.9rem;
        text-align: right;
    }

    .intel-hojum-status {
        padding: 12px;
        background: rgba(255, 107, 107, 0.1);
        border: 1px solid rgba(255, 107, 107, 0.2);
        border-radius: 8px;
        color: #6bcf7f;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 16px;
    }

    .intel-results {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 4px 16px var(--shadow-color);
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 300px;
    }

    .intel-results-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
    }

    .intel-results-header h3 {
        margin: 0;
        color: #ffffff;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .intel-results-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .intel-results-badge {
        background: rgba(107, 207, 127, 0.15);
        color: #6bcf7f;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 600;
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .intel-results-content {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .intel-empty-state {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #666;
        text-align: center;
        padding: 40px;
    }

    .intel-empty-state i {
        font-size: 3rem;
        margin-bottom: 16px;
        opacity: 0.5;
    }

    .intel-empty-state p {
        margin: 0 0 8px 0;
        font-size: 1.1rem;
        color: #888;
    }

    .intel-empty-state small {
        color: #555;
    }

    .intel-finding {
        background: rgba(30, 30, 30, 0.6);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 16px;
        transition: all 0.2s ease;
        border-left: 4px solid #666;
    }

    .intel-finding:hover {
        background: rgba(35, 35, 35, 0.8);
        border-color: #444;
        transform: translateX(4px);
    }

    .intel-finding.threat {
        border-left-color: #ff6b6b;
        background: rgba(255, 107, 107, 0.08);
    }

    .intel-finding.risk {
        border-left-color: #ffd93d;
        background: rgba(255, 217, 61, 0.08);
    }

    .intel-finding.connection {
        border-left-color: #4d9de0;
        background: rgba(77, 157, 224, 0.08);
    }

    .intel-finding.positive {
        border-left-color: #6bcf7f;
        background: rgba(107, 207, 127, 0.08);
    }

    .intel-finding.info {
        border-left-color: #aaa;
        background: rgba(170, 170, 170, 0.05);
    }

    .intel-finding-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 10px;
        gap: 12px;
    }

    .intel-finding-title {
        font-weight: 600;
        color: #ffffff;
        font-size: 1rem;
        flex: 1;
    }

    .intel-finding-subject {
        font-size: 0.9rem;
        color: #888;
        margin-top: 4px;
    }

    .intel-finding-type {
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        white-space: nowrap;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .intel-finding-type i {
        font-size: 0.75rem;
    }

    .intel-finding-type.threat {
        background: rgba(255, 107, 107, 0.25);
        color: #ff6b6b;
    }

    .intel-finding-type.risk {
        background: rgba(255, 217, 61, 0.25);
        color: #ffd93d;
    }

    .intel-finding-type.connection {
        background: rgba(77, 157, 224, 0.25);
        color: #4d9de0;
    }

    .intel-finding-type.positive {
        background: rgba(107, 207, 127, 0.25);
        color: #6bcf7f;
    }

    .intel-finding-type.info {
        background: rgba(170, 170, 170, 0.2);
        color: #ccc;
    }

    .intel-finding-content {
        color: #bbb;
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .intel-finding-evidence {
        margin-top: 10px;
        padding: 10px 12px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 8px;
        font-size: 0.85rem;
    }

    .intel-finding-evidence strong {
        color: #ddd;
    }

    .intel-finding-footer {
        margin-top: 12px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .intel-finding-tag {
        padding: 4px 10px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        font-size: 0.75rem;
        color: #999;
    }

    .intel-finding-loading {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 60px;
        color: #888;
    }

    .intel-finding-loading i {
        font-size: 2rem;
        animation: pulse 1.5s ease-in-out infinite;
    }

    .intel-quick-stats {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .intel-quick-stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        background: rgba(30, 30, 30, 0.4);
        border-radius: 8px;
    }

    .intel-quick-stat-label {
        color: #888;
        font-size: 0.85rem;
    }

    .intel-quick-stat-value {
        font-weight: 600;
        color: #ddd;
        font-size: 0.9rem;
    }

    .intel-context-sources {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .intel-context-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 10px;
        background: rgba(30, 30, 30, 0.4);
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.2s ease;
        font-size: 0.9rem;
        color: #ccc;
    }

    .intel-context-item:hover {
        background: rgba(40, 40, 40, 0.6);
    }

    .intel-context-item input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: #6bcf7f;
    }

    @media (max-width: 900px) {
        .intel-grid {
            grid-template-columns: 1fr;
        }
        
        .intel-card.intel-primary {
            grid-column: 1;
        }

        .intel-risk-row {
            grid-template-columns: 80px 1fr 40px;
        }
    }

    /* Credit Evaluation Modal */
    .credit-eval-modal {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 2000;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(8px);
    }

    .credit-eval-modal.active {
        display: flex;
        animation: creditEvalFadeIn 0.3s ease;
    }

    @keyframes creditEvalFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .credit-eval-content {
        background: linear-gradient(180deg, #1e1e1e 0%, #151515 100%);
        border: 1px solid #333;
        border-radius: 20px;
        padding: 32px;
        width: 90%;
        max-width: 500px;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
        animation: creditEvalSlideIn 0.3s ease;
    }

    @keyframes creditEvalSlideIn {
        from { transform: translateY(-20px) scale(0.95); opacity: 0; }
        to { transform: translateY(0) scale(1); opacity: 1; }
    }

    .credit-eval-header {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-bottom: 24px;
    }

    .credit-eval-icon {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: linear-gradient(145deg, #6bcf7f, #4a9e5c);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: #fff;
    }

    .credit-eval-icon.processing {
        background: linear-gradient(145deg, #ffd93d, #e6c235);
    }

    .credit-eval-icon.done {
        background: linear-gradient(145deg, #6bcf7f, #4a9e5c);
    }

    .credit-eval-header h2 {
        margin: 0;
        font-size: 1.4rem;
        color: #fff;
        font-family: 'AllianceNo2', 'Segoe UI', sans-serif;
    }

    .credit-eval-body {
        margin-bottom: 24px;
    }

    .credit-eval-progress-container {
        background: rgba(30, 30, 30, 0.8);
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 16px;
    }

    .credit-eval-status {
        display: flex;
        justify-content: space-between;
        margin-bottom: 12px;
        font-size: 0.9rem;
    }

    .credit-eval-status-label {
        color: #aaa;
    }

    .credit-eval-status-value {
        color: #fff;
        font-weight: 600;
    }

    .credit-eval-progress-bar {
        height: 12px;
        background: rgba(50, 50, 50, 0.8);
        border-radius: 6px;
        overflow: hidden;
    }

    .credit-eval-progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #6bcf7f, #4a9e5c);
        border-radius: 6px;
        transition: width 0.3s ease;
        position: relative;
    }

    .credit-eval-progress-fill::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        animation: creditEvalShimmer 1.5s infinite;
    }

    @keyframes creditEvalShimmer {
        0% { transform: translateX(-100%); }
        100% { transform: translateX(100%); }
    }

    .credit-eval-current {
        margin-top: 12px;
        padding: 12px;
        background: rgba(40, 40, 40, 0.6);
        border-radius: 8px;
        font-size: 0.9rem;
        color: #ccc;
    }

    .credit-eval-current-name {
        font-weight: 600;
        color: #fff;
    }

    .credit-eval-results {
        background: rgba(30, 30, 30, 0.8);
        border-radius: 12px;
        padding: 20px;
    }

    .credit-eval-results h3 {
        margin: 0 0 16px 0;
        font-size: 1.1rem;
        color: #fff;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .credit-eval-results h3 i {
        color: #6bcf7f;
    }

    .credit-eval-summary {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin-bottom: 16px;
    }

    .credit-eval-stat {
        text-align: center;
        padding: 12px;
        background: rgba(40, 40, 40, 0.6);
        border-radius: 8px;
    }

    .credit-eval-stat-value {
        font-size: 1.5rem;
        font-weight: 700;
        color: #fff;
    }

    .credit-eval-stat-label {
        font-size: 0.8rem;
        color: #888;
        margin-top: 4px;
    }

    .credit-eval-stat.high .credit-eval-stat-value { color: #ff6b6b; }
    .credit-eval-stat.medium .credit-eval-stat-value { color: #ffd93d; }
    .credit-eval-stat.low .credit-eval-stat-value { color: #6bcf7f; }

    .credit-eval-detail {
        font-size: 0.9rem;
        color: #aaa;
        line-height: 1.5;
    }

    .credit-eval-footer {
        display: flex;
        justify-content: flex-end;
        gap: 12px;
    }
