:root {
    --accent-primary: #8b5cf6; /* Modern Violet Accent */
    --accent-hover: #7c3aed;
    --accent-bg: rgba(139, 92, 246, 0.15);
}

* {
    box-sizing: border-box;
}

        body {
            margin: 0;
            background-color: rgb(0, 0, 0);
            color: rgb(244, 244, 245);
            font-family:   "Montserrat",Arial, sans-serif;
        }

        .col {
            display: flex;
            flex-direction: column;
        }

        #lead-count {
            cursor: pointer;
        }

        #toast {
            min-width: 200px;
            position: fixed;
            bottom: 18px;
            right: 18px;
            z-index: 9999;
            min-width: 96px;
            border-radius: 999px;
            background: rgb(22, 163, 74);
            color: white;
            font-size: 14px;
            font-weight: 700;
            opacity: 0;
            padding: 9px 14px;
            pointer-events: none;
            text-align: center;
            transform: translateY(-8px);
            transition: opacity 140ms ease, transform 140ms ease;
        }

        #toast.is-visible {
            opacity: 1;
            transform: translateY(0);
        }

        .active {
            background-color: rgba(0, 128, 0, 0.129);
        }

        tr:hover {
            background-color: rgba(0, 128, 0, 0.129);

        }

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

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

        main {
            width: min(1320px, 100%);
            margin: 0 auto;
            padding: 28px;
        }

        .search-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .search-wrapper #search-clear {
            position: absolute;
            right: 10px;
            cursor: pointer;
            color: rgb(161, 161, 170);
            font-size: 16px;
            pointer-events: auto;
        }

        .search-wrapper #search-clear:hover {
            color: rgb(244, 244, 245);
        }

        .search-wrapper input {
            padding-right: 32px;
        }

        header {
            justify-content: space-between;
            margin-top: 0px;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgb(47, 48, 54);
  width: 100%;
  padding: 10px;
}

.secondary {
  background-color: rgb(36, 33, 44);
    border: 1px solid green;
    border-radius: 20px;
}

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

        h1 {
            margin: 0;
            font-size: 28px;
        }

        .muted {
            color: rgb(161, 161, 170);
        }

        form {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 16px;
            background: rgba(39, 39, 42, 0);
            border-radius: 8px;
            margin-bottom: 18px;
        }

        .form-grid {
            display: grid;
            grid-template-columns: 2fr 2fr 1fr 120px 140px 150px;
            gap: 10px;
        }

        label {
            display: flex;
            flex-direction: column;
            gap: 6px;
            color: rgb(212, 212, 216);
            font-size: 13px;
        }

        input, textarea, select {
            width: 100%;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 6px;
            background: rgb(24, 24, 27);
            color: rgb(244, 244, 245);
            padding: 10px;
            font: inherit;
        }

        textarea {
            min-height: 42px;
            resize: vertical;
  field-sizing: content; /* used to be `form-sizing` but changed to this */


  scrollbar-width: thin;
field-sizing: content;
resize: none;
min-height: calc(1lh + 16px);
max-height: calc(11lh + 16px);
overflow-y: auto;
        }

        button {
            align-self: flex-start;
            border: 0;
            border-radius: 6px;
            background: rgb(48, 190, 79);
            color: white;
            cursor: pointer;
            font-weight: 700;
            padding: 10px 14px;
            font-size: 16px;
        }

        button:hover {
            background: rgb(30, 199, 44);
        }

        button:disabled {
            cursor: wait;
            opacity: 0.7;
        }

        .link-button {
            background: transparent;
            color: rgb(147, 197, 253);
            padding: 0;
        }

        .link-button:hover {
            background: transparent;
            color: rgb(191, 219, 254);
            text-decoration: underline;
        }

        .auth-page {
            min-height: 100vh;
            display: grid;
            place-items: center;
        }

        .auth-shell {
            width: min(420px, 100%);
            padding: 20px;
        }

        .auth-panel {
            margin: 0;
        }

        .auth-panel h1 {
            margin-bottom: 6px;
        }

        #auth-message {
            min-height: 20px;
            margin: 0;
            color: rgb(212, 212, 216);
            font-size: 14px;
        }

        button.danger {
            background: rgb(127, 29, 29);
            padding: 8px 10px;
        }

        button.danger:hover {
            background: rgb(153, 27, 27);
        }

        .table-wrap {
            overflow-x: auto;
            border: 0px solid rgb(63, 63, 70);
            border-radius: 8px;
            margin-bottom: 24px;
        }

        table {
            width: 100%;
            min-width: 1120px;
            border-collapse: collapse;
            background: rgb(39, 39, 42);
            table-layout: auto;
        }

        th, td {
            border-bottom: 1px solid rgb(63, 63, 70);
            padding: 12px;
            text-align: left;
            vertical-align: top;
        }

        th {
            background: rgb(32, 32, 35);
            color: rgb(212, 212, 216);
            font-size: 13px;
        }

        td {
            color: rgb(228, 228, 231);
            font-size: 14px;
        }

        .link-cell {
            width: 150px;
            max-width: 150px;
            overflow-wrap: anywhere;
        }

        .link-cell a {
            display: flex;
            flex-direction: column;
            gap: 3px;
            text-decoration: none;
        }

        .link-cell a:hover {
            text-decoration: underline;
        }


        .link-subreddit {
            font-size: 14px;
            padding: 10px;
            border-radius: 20px;
            color: white;
            background-color: rgb(228, 91, 57);
            width: fit-content;
        }

        .link-subreddit:hover {
            background-color: rgb(226, 75, 37);
            text-decoration: none !important;
        }

        .link-slug {
            color: rgb(255, 255, 255);
            font-size: 12px;
            line-height: 1.25;
            margin-top: 9px;
        }

        .text-cell {
            min-width: 280px;
        }

        .post-cell {
            width: 340px;
        }

        .keyword-pill {
            display: inline-block;
            background: rgb(234, 179, 8);
            color: rgb(0, 0, 0);
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 700;
            margin-bottom: 6px;
            width: fit-content;
        }

        .reply-cell {
            width: 440px;
        }

        .reply-actions {
            display: flex;
            gap: 6px;
            margin-bottom: 6px;
        }

        .reply-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 10px 14px;
            border-radius: 5px;
            background-color: rgb(34, 197, 94);
            color: rgb(255, 255, 255);
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0;
        }

        .reply-pill:hover {
            background-color: rgb(22, 163, 74);
        }

        .reply-pill:disabled {
            cursor: wait;
            opacity: 0.75;
        }

        .lead-textarea {
            min-height: 98%;
            max-height: 180px;
            padding: 8px;
            resize: vertical;
            transition: min-height 160ms ease, box-shadow 160ms ease;
        }

        .lead-textarea:focus {
            min-height: 220px;
            position: relative;
            z-index: 1;
            box-shadow: 0 0 0 2px rgb(59, 130, 246);
        }

        .lead-textarea.is-saving {
            border-color: rgb(147, 197, 253);
        }

        .lead-textarea.has-error {
            border-color: rgb(248, 113, 113);
        }

        .reply-cell {
            width: 440px;
        }

        .views-input {
            padding: 7px 8px;
        }

        .views-input.is-saving {
            border-color: rgb(147, 197, 253);
        }

        .status-cell {
            padding: 0;
        }

        .status-content {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;
            max-width: 150px;
        }

        .status-content .views-input {
            width: 120px;
        }

         .views-input {
            font-size: 8px;
            padding: 3px;
         }

         .visitors-input {
             font-size: 13px;
             padding: 6px;
             text-align: right;
         }

        .status-content .status-pill {
            margin-bottom: 0;
        }

        .views-input.has-error {
            border-color: rgb(248, 113, 113);
        }

        .user-cell {
            white-space: nowrap;
        }

        .subreddit-pill {
            display: inline-block;
            border: 1px solid rgb(34, 197, 94);
            border-radius: 999px;
            background: rgba(34, 197, 94, 0.1);
            color: rgb(34, 197, 94);
            font-weight: 700;
            font-size: 13px;
            padding: 4px 14px;
            text-decoration: none;
            transition: background 150ms ease, color 150ms ease;
        }

        .subreddit-pill:hover {
            background: rgb(34, 197, 94);
            color: rgb(0, 0, 0);
        }

        .user-pill {
            max-width: 130px;
            border: 1px solid rgb(82, 82, 91);
            border-radius: 999px;
            background: rgb(63, 63, 70);
            color: rgb(244, 244, 245);
            cursor: pointer;
            overflow: hidden;
            padding: 6px 10px;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .user-pill:hover {
            background: rgb(82, 82, 91);
        }

        .user-pill.is-saving {
            border-color: rgb(147, 197, 253);
        }

        .user-pill.has-error {
            border-color: rgb(248, 113, 113);
        }

        .status-pill {
            border: 0;
            display: inline-flex;
            align-items: center;
            border-radius: 999px;
            color: white;
            cursor: pointer;
            font-size: 12px;
            font-weight: 700;
            line-height: 1;
            padding: 6px 10px;
            text-transform: capitalize;
        }

        .status-pill:hover {
            filter: brightness(1.12);
        }

        .status-pill:disabled {
            cursor: wait;
            opacity: 0.7;
        }

        .status-pill.status-pending {
            background: rgb(126, 34, 206);
        }

        .status-pill.status-done {
            background: rgb(22, 101, 52);
        }

        .date-cell {
            line-height: 1.35;
        }

        .date-line + .date-line {
            margin-top: 10px;
        }

        a {
            color: rgb(147, 197, 253);
        }

        #empty-state {
            padding: 20px;
            background: rgb(39, 39, 42);
            border: 1px solid rgb(63, 63, 70);
            border-radius: 8px;
        }

        #feedback {
            color: rgb(252, 165, 165);
            font-size: 14px;
            margin: 0 0 14px;
            min-height: 18px;
        }

        .progress-panel {
            border: 1px solid rgb(63, 63, 70);
            border-radius: 8px;
            background: rgb(39, 39, 42);
            padding: 18px;
        }

        .progress-header {
            align-items: flex-start;
            justify-content: space-between;
            margin-bottom: 16px;
        }

        .progress-header h2 {
            font-size: 20px;
            margin: 0 0 6px;
        }

        .progress-summary {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: flex-end;
        }

        .metric-pill {
            border: 1px solid rgb(82, 82, 91);
            border-radius: 999px;
            background: rgb(24, 24, 27);
            color: rgb(228, 228, 231);
            font-size: 13px;
            padding: 7px 10px;
            white-space: nowrap;
        }

        #chart-total-awaiting-triage {
            background: rgb(217, 119, 6);
            color: white;
            border-color: rgb(217, 119, 6);
        }

        .chart-wrap {
            position: relative;
            width: 100%;
            height: 320px;
        }

        #progress-chart {
            display: block;
            width: 100%;
            height: 100%;
        }

        @media (max-width: 980px) {
            main {
                padding: 18px;
            }

            header.row {
                align-items: flex-start;
                flex-direction: column;
            }

            .header-actions {
                width: 100%;
                justify-content: space-between;
            }

            .form-grid {
                grid-template-columns: 1fr;
            }

            .form-grid {
                grid-template-columns: 1fr;
            }

            .progress-header {
                flex-direction: column;
            }

            .progress-summary {
                justify-content: flex-start;
            }
        }

        /* New Statuses & Admin Select Dropdown Styling */
        select.status-select {
            border: 0;
            border-radius: 999px;
            color: white;
            cursor: pointer;
            font-size: 12px;
            font-weight: 700;
            padding: 6px 12px;
            width: auto;
            display: inline-block;
            appearance: none;
            -webkit-appearance: none;
            text-transform: capitalize;
            text-align: center;
        }
        
        select.status-select:hover {
            filter: brightness(1.15);
        }

        select.status-select.status-awaiting-triage,
        .status-pill.status-awaiting-triage {
            background: rgb(217, 119, 6); /* Orange */
        }
        
        select.status-select.status-rejected,
        .status-pill.status-rejected {
            background: rgb(220, 38, 38); /* Red */
        }
        
        select.status-select.status-pending,
        .status-pill.status-pending {
            background: rgb(126, 34, 206); /* Purple */
        }
        
        select.status-select.status-done,
        .status-pill.status-done {
            background: rgb(22, 101, 52); /* Green */
        }
        
        select.status-select.status-deleted-by-reddit,
        .status-pill.status-deleted-by-reddit {
            background: rgb(107, 114, 128); /* Gray */
        }

        /* Mobile Responsive Card Layout */
        @media (max-width: 600px) {
            .table-wrap {
                border: none;
                border-radius: 0;
                overflow-x: visible;
                margin-bottom: 16px;
            }

            table {
                display: block;
                min-width: 0 !important;
                background: transparent;
                border-collapse: collapse;
            }

            thead {
                display: none;
            }

            tbody {
                display: flex;
                flex-direction: column;
                gap: 16px;
                background: transparent;
            }

            tr[data-lead-id] {
                display: flex;
                flex-direction: column;
                gap: 12px;
                padding: 16px;
                background: rgb(32, 32, 35);
                border: 0px solid rgba(255, 255, 255, 0.08);
                border-radius: 12px;
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
                transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
            }

            tr[data-lead-id]:hover {
                background-color: rgb(39, 39, 42);
                border-color: rgba(255, 255, 255, 0.15);
            }

            tr[data-lead-id].active {
                border-color: rgb(59, 130, 246);
                background-color: rgba(59, 130, 246, 0.03);
                box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
            }

            td {
                display: block;
                width: 100% !important;
                max-width: none !important;
                padding: 0 !important;
                border-bottom: none !important;
            }

            /* Link cell styling */
            .link-cell {
                border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
                padding-bottom: 10px !important;
                margin-bottom: 4px;
            }

            .link-cell a {
                gap: 4px;
            }

         

            .link-slug {
                font-size: 11px;

            }

            /* Input sections */
            .post-cell::before {
                content: "Post Body";
                display: block;
                font-size: 10px;
                color: rgb(113, 113, 122);
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: 0.05em;
                margin-bottom: 6px;
            }

            .reply-cell::before {
                content: "Reply Content";
                display: block;
                font-size: 10px;
                color: rgb(113, 113, 122);
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: 0.05em;
                margin-bottom: 6px;
            }

            .lead-textarea {
                min-height: 80px;
            }

            .lead-textarea:focus {
                min-height: 140px;
            }

            /* User cell styling */
            .user-cell {
                display: flex;
                align-items: center;
                gap: 8px;
            }

            .user-cell::before {
                content: "User:";
                font-size: 10px;
                color: rgb(113, 113, 122);
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: 0.05em;
            }

            .user-pill {
                max-width: none !important;
                padding: 5px 12px;
                font-size: 13px;
            }

            /* Status cell styling */
            .status-cell::before {
                content: "Status & Views";
                display: block;
                font-size: 10px;
                color: rgb(113, 113, 122);
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: 0.05em;
                margin-bottom: 6px;
            }

            .status-content {
                display: flex !important;
                flex-direction: row !important;
                align-items: center !important;
                gap: 12px !important;
                max-width: none !important;
                width: 100%;
            }

            .status-content select.status-select {
                flex: 1;
                height: 36px;
                font-size: 13px;
                padding: 6px 12px;
            }

            .status-content .views-input {
                width: 90px !important;
                height: 36px;
                font-size: 13px;
                text-align: center;
            }

            /* Date cell styling acting as a card footer */
            .date-cell {
                border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
                padding-top: 10px !important;
                display: flex !important;
                flex-direction: row !important;
                justify-content: space-between;
                flex-wrap: wrap;
                gap: 8px;
                font-size: 12px !important;
                color: rgb(161, 161, 170) !important;
            }

            .date-line {
                margin-top: 0 !important;
            }
        }

/* Tab Navigation */
.tabs-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgb(63, 63, 70);
    padding-bottom: 8px;
}

.tab-btn {
    background: transparent;
    color: rgb(161, 161, 170);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}

.tab-btn:hover {
    background: rgb(39, 39, 42);
    color: rgb(244, 244, 245);
}

.tab-btn.active {
    background: rgb(59, 130, 246);
    color: white;
}

/* User management specific styles */
.user-status-btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    display: inline-block;
}

.user-status-btn.approve {
    background: rgb(22, 163, 74);
}
.user-status-btn.approve:hover {
    background: rgb(21, 128, 61);
}

.user-status-btn.reject {
    background: rgb(220, 38, 38);
}
.user-status-btn.reject:hover {
    background: rgb(185, 28, 28);
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: bold;
    text-transform: capitalize;
}

.status-badge.approved {
    background-color: rgba(22, 163, 74, 0.2);
    color: rgb(74, 222, 128);
    border: 1px solid rgb(22, 163, 74);
}

.status-badge.pending {
    background-color: rgba(234, 179, 8, 0.2);
    color: rgb(250, 204, 21);
    border: 1px solid rgb(234, 179, 8);
}

/* Desktop Horizontal Card Layout */
@media (min-width: 601px) {
    #leads-view .table-wrap {
        border: none;
        background: transparent;
    }

    #leads-view table {
        display: flex;
        flex-direction: column;
        min-width: 1120px;
        background: transparent;
    }

    #leads-view thead {
        display: block;
        background: transparent;
        margin-bottom: 8px;
        padding: 0 16px; /* Match the padding of the card rows */
    }

    #leads-view thead tr {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    #leads-view thead th {
        border-bottom: none;
        background: transparent;
        padding: 8px 12px;
    }

    #leads-view tbody {
        display: flex;
        flex-direction: column;
        gap: 12px; /* Margin/gap between rows */
        background: transparent;
    }

    #leads-view tr[data-lead-id] {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        background: rgb(39, 39, 42);
        border: 0px solid rgb(63, 63, 70);
        border-radius: 12px;
        padding: 16px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
    }

    #leads-view tr[data-lead-id]:hover {
        border-color: rgb(82, 82, 91);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        background-color: rgb(43, 43, 46);
    }

    #leads-view tr[data-lead-id].active {
        border-color: rgba(59, 246, 162, 0.744);
        border-width: 1px;
        background-color: rgba(48, 49, 51, 0.697);
    }

    #leads-view td {
        border-bottom: none;
        padding: 0 12px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    /* Align columns on desktop */
    #leads-view th:nth-child(1),
    #leads-view td.link-cell {
        width: 150px;
        flex-shrink: 0;
        padding-left: 0;
    }

    #leads-view th:nth-child(2),
    #leads-view td.post-cell {
        width: 340px;
        flex-shrink: 0;
    }

    #leads-view th:nth-child(3),
    #leads-view td.reply-cell {
        width: 440px;
        flex-shrink: 0;
    }

    #leads-view th:nth-child(4),
    #leads-view td.user-cell {
        width: 140px;
        flex-shrink: 0;
    }

    #leads-view th:nth-child(5),
    #leads-view td.status-cell {
        width: 150px;
        flex-shrink: 0;
    }

    #leads-view th:nth-child(6),
    #leads-view td.date-cell {
        flex-grow: 1;
        flex-shrink: 1;
        padding-right: 0;
    }
}

/* Trash Button & Status Styling */
/* Serial Number Badge */
.serial-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: rgb(161, 161, 170);
    padding: 2px 7px;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.trash-btn {
    color: rgb(161, 161, 170);
    font-size: 16px;
    cursor: pointer;
    transition: color 150ms ease, transform 150ms ease;
    padding: 4px;
}

.trash-btn:hover {
    color: rgb(239, 68, 68);
    transform: scale(1.15);
}

.trash-wrapper {
    margin-top: 8px;
    display: flex;
    align-items: center;
}

select.status-select.status-trash,
.status-pill.status-trash {
    background: rgb(220, 38, 38);
}





        /* Scoped style overrides for premium assistant panel aesthetics */
        body {
            font-family: 'Inter', sans-serif;
            background: radial-gradient(circle at top left, rgb(15, 15, 20), rgb(24, 24, 27));
            min-height: 100vh;
        }
        
        .va-header {
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            background: rgba(39, 39, 42, 0.6);
            backdrop-filter: blur(12px);
            padding: 16px 28px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .va-brand {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .va-logo-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgb(59, 130, 246);
            box-shadow: 0 0 12px rgb(59, 130, 246);
        }

        .va-header h1 {
            font-size: 20px;
            font-weight: 600;
            letter-spacing: -0.5px;
            background: linear-gradient(135deg, #fff 40%, #a1a1aa);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

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

        .va-user-email {
            font-size: 13px;
            color: rgb(161, 161, 170);
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.05);
            padding: 6px 12px;
            border-radius: 999px;
        }

        .va-main {
            width: min(800px, 100%);
            margin: 40px auto;
            padding: 0 20px;
        }

        .empty-drip-state {
            text-align: center;
            padding: 80px 40px;
            background: rgba(39, 39, 42, 0.4);
            border: 1px dashed rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            backdrop-filter: blur(8px);
            animation: fadeIn 0.4s ease;
        }

        .empty-drip-state h2 {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 12px;
        }

        .empty-drip-state p {
            font-size: 15px;
            max-width: 400px;
            margin: 0 auto 30px;
            line-height: 1.5;
        }

        .primary-btn {
            background: linear-gradient(135deg, rgb(59, 130, 246), rgb(37, 99, 235));
            box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
            padding: 14px 28px;
            font-size: 15px;
            border-radius: 8px;
            transition: transform 0.2s, box-shadow 0.2s;
            align-self: center;
        }

        .primary-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
        }

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

        .lead-drip-card {
            background: rgba(39, 39, 42, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            padding: 30px;
            backdrop-filter: blur(12px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .lead-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            padding-bottom: 18px;
            margin-bottom: 24px;
        }

        .subreddit-tag {
            font-size: 13px;
            font-weight: 700;
            color: rgb(34, 197, 94);
            background: rgba(34, 197, 94, 0.1);
            padding: 4px 10px;
            border-radius: 4px;
            border: 1px solid rgba(34, 197, 94, 0.2);
            letter-spacing: 0.5px;
        }

        .user-assignment-tag {
            font-size: 13px;
            color: rgb(161, 161, 170);
        }

        .user-assignment-tag strong {
            color: #fff;
        }

        .lead-section {
            margin-bottom: 24px;
        }

        .lead-section h3 {
            font-size: 13px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: rgb(161, 161, 170);
            margin-bottom: 10px;
        }

        .post-body-text {
            background: rgba(24, 24, 27, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.04);
            border-radius: 8px;
            padding: 16px;
            font-size: 14px;
            line-height: 1.6;
            color: rgb(228, 228, 231);
            white-space: pre-wrap;
            max-height: 200px;
            overflow-y: auto;
        }

        .lead-textarea {
            width: 100%;
            background: rgba(24, 24, 27, 0.8);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 16px;
            font-family: inherit;
            font-size: 14px;
            line-height: 1.6;
            color: #fff;
            resize: none;
            min-height: 120px;
            margin-bottom: 12px;
        }

        .copy-row {
            display: flex;
            justify-content: flex-end;
            margin-bottom: 24px;
        }

        .secondary-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: rgb(244, 244, 245);
            font-size: 13px;
            padding: 8px 16px;
            border-radius: 6px;
            transition: background 0.2s, border-color 0.2s;
        }

        .secondary-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.2);
        }

        .lead-actions-row {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr;
            gap: 12px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            padding-top: 24px;
        }

        .open-reddit-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, rgb(249, 115, 22), rgb(234, 88, 12));
            color: white;
            font-weight: 700;
            text-decoration: none;
            border-radius: 8px;
            font-size: 14px;
            transition: transform 0.2s, box-shadow 0.2s;
            box-shadow: 0 4px 15px rgba(249, 115, 22, 0.2);
        }

        .open-reddit-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 18px rgba(249, 115, 22, 0.3);
        }

        .success-btn {
            background: rgb(22, 101, 52);
            color: white;
            border-radius: 8px;
            font-size: 14px;
        }
        .success-btn:hover {
            background: rgb(21, 128, 61);
        }

        .danger-btn {
            background: rgb(127, 29, 29);
            color: white;
            border-radius: 8px;
            font-size: 14px;
        }
        .danger-btn:hover {
            background: rgb(153, 27, 27);
        }

        .warning-btn {
            background: rgb(39, 39, 42);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: rgb(228, 228, 231);
            border-radius: 8px;
            font-size: 14px;
        }
        .warning-btn:hover {
            background: rgba(255, 255, 255, 0.05);
        }

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

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @media (max-width: 680px) {
            .lead-actions-row {
                grid-template-columns: 1fr;
                gap: 10px;
            }
            .open-reddit-btn {
                padding: 12px;
            }}

        /* Sidebar Drawer Styles */
        .sidebar-drawer {
            position: fixed;
            top: 0;
            right: -450px;
            width: 450px;
            height: 100vh;
            background-color: rgb(24, 24, 27);
            border-left: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: -5px 0 25px rgba(0, 0, 0, 0.7);
            z-index: 1000;
            transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
        }

        .sidebar-drawer.open {
            right: 0;
        }

        .sidebar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            background-color: rgb(39, 39, 42);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .sidebar-header h3 {
            margin: 0;
            font-size: 18px;
            color: rgb(244, 244, 245);
        }

        .sidebar-header .close-btn {
            background: transparent;
            border: none;
            color: rgb(161, 161, 170);
            cursor: pointer;
            padding: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            font-size: 18px;
            width: 32px;
            height: 32px;
            align-self: auto;
        }

        .sidebar-header .close-btn:hover {
            color: rgb(244, 244, 245);
            background-color: rgba(255, 255, 255, 0.05);
        }

        .sidebar-body {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            scrollbar-width: thin;
        }

        .sidebar-form {
            display: flex;
            flex-direction: column;
            gap: 16px;
            background: transparent;
            padding: 0;
            margin: 0;
            border: none;
            border-radius: 0;
        }

        .sidebar-form label {
            font-weight: 500;
        }

        .sidebar-form textarea {
            min-height: 80px;
            resize: vertical;
        }

        /* Hover cursor on project table rows */
        #project-table-body tr {
            cursor: pointer;
        }

        /* Selected project row style */
        #project-table-body tr.selected {
            background-color: rgba(59, 130, 246, 0.15) !important;
            outline: 1px solid rgb(59, 130, 246);
        }

        /* Custom style for input/textarea while saving */
        .sidebar-form input.is-saving,
        .sidebar-form textarea.is-saving {
            border-color: rgb(59, 130, 246);
            background-color: rgba(59, 130, 246, 0.05);
        }

        .sidebar-form input.has-error,
        .sidebar-form textarea.has-error {
            border-color: rgb(239, 68, 68);
            background-color: rgba(239, 68, 68, 0.05);
        }

        .loading-pulse {
            animation: buttonPulse 1.2s infinite alternate !important;
            opacity: 0.9;
            cursor: wait !important;
            pointer-events: none;
        }

        @keyframes buttonPulse {
            0% { transform: scale(1); filter: brightness(1); }
            100% { transform: scale(0.96); filter: brightness(0.75); }
        }

        /* Leads Filters and Pagination Styling */
        .leads-filters-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
            background: rgb(24, 24, 27);
            border: 1px solid rgb(39, 39, 42);
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 20px;
        }

        .filter-group {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
        }

        .filter-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .filter-label {
            font-size: 13px;
            font-weight: 600;
            color: rgb(161, 161, 170);
            min-width: 65px;
        }

        .filter-btn {
            background: rgb(39, 39, 42);
            border: 1px solid rgb(63, 63, 70);
            color: rgb(228, 228, 231);
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 13px;
            cursor: pointer;
            transition: all 150ms ease;
            text-transform: capitalize;
        }

        .filter-btn:hover {
            background: rgb(63, 63, 70);
            border-color: rgb(113, 113, 122);
        }

        .filter-btn.active {
            background: rgba(34, 197, 94, 0.1);
            border-color: rgb(34, 197, 94);
            color: rgb(74, 222, 128);
        }

        .refresh-btn {
            background: rgb(24, 24, 27);
            border: 1px solid rgb(63, 63, 70);
            color: rgb(161, 161, 170);
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 13px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 150ms ease;
            margin-left: auto;
        }

        .refresh-btn:hover {
            background: rgb(39, 39, 42);
            color: rgb(228, 228, 231);
            border-color: rgb(113, 113, 122);
        }

        .load-more-container {
            display: flex;
            justify-content: center;
            margin: 24px 0;
            width: 100%;
        }

        .load-more-btn {
            background: rgb(39, 39, 42);
            border: 1px solid rgb(63, 63, 70);
            color: rgb(228, 228, 231);
            padding: 10px 24px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 150ms ease;
        }

        .load-more-btn:hover {
            background: rgb(63, 63, 70);
            border-color: rgb(113, 113, 122);
        }

        .load-more-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Specific active colors for status filter buttons */
        .filter-btn[data-status="awaiting triage"].active {
            background: rgb(217, 119, 6);
            border-color: rgb(217, 119, 6);
            color: #ffffff;
        }

        .filter-btn[data-status="done"].active {
            background: rgb(22, 101, 52);
            border-color: rgb(22, 101, 52);
            color: #ffffff;
        }

        .filter-btn[data-status="rejected"].active,
        .filter-btn[data-status="deleted by reddit"].active,
        .filter-btn[data-status="trash"].active {
            background: rgba(185, 28, 28, 0.35);
            border-color: rgb(185, 28, 28);
            color: rgb(254, 226, 226);
        }

        .filter-btn[data-status="user"].active {
            background: rgba(168, 85, 247, 0.35);
            border-color: rgb(168, 85, 247);
            color: #ffffff;
        }

        /* CRM Tag Pills Styling */
        .crm-tags-container {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 4px;
        }

        .crm-tag-pill {
            display: inline-flex;
            align-items: center;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 6px;
            white-space: nowrap;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: rgb(228, 228, 231);
            text-transform: lowercase;
            transition: all 150ms ease;
        }

        .crm-tag-pill.tag-urgent {
            background: rgba(239, 68, 68, 0.15);
            border-color: rgba(239, 68, 68, 0.4);
            color: rgb(248, 113, 113);
        }

        .crm-tag-pill.tag-interesting {
            background: rgba(34, 197, 94, 0.15);
            border-color: rgba(34, 197, 94, 0.4);
            color: rgb(74, 222, 128);
        }

        .crm-tag-pill.tag-bad-quality {
            background: rgba(249, 115, 22, 0.15);
            border-color: rgba(249, 115, 22, 0.4);
            color: rgb(251, 146, 60);
        }

        .crm-tag-pill.tag-old {
            background: rgba(156, 163, 175, 0.15);
            border-color: rgba(156, 163, 175, 0.4);
            color: rgb(209, 213, 219);
        }

        .crm-tag-pill.tag-user {
            background: rgba(168, 85, 247, 0.15);
            border-color: rgba(168, 85, 247, 0.4);
            color: rgb(192, 132, 252);
        }