:root {
    /* Dark dashboard theme */
    --bg: #0c1020;
    --panel: #12182b;
    --panel-2: #0f1426;
    --ink: #e6e8ee;
    --muted: #8891a7;
    --line: rgba(136,145,167,.25);
    --brand: #6d6cff;
    --brand-2: #11b3ff;
    --good: #22c571;
    --warn: #f59e0b;
    --bad: #ef4444;
    --main-gradient: linear-gradient(90deg, #ff7e5f, #feb47b);
}

        * { box-sizing: border-box; }
        body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: radial-gradient(900px 600px at 10% -10%, rgba(109,108,255,.25), transparent 55%), radial-gradient(900px 600px at 90% 10%, rgba(17,179,255,.18), transparent 55%), linear-gradient(180deg, var(--bg), #080b17); color: var(--ink); margin: 0; }
        .container { max-width: 1280px; margin: 0 auto; padding: 24px 20px 48px; }
        h1 { margin-bottom: 8px; letter-spacing: -.03em; }
        h2 { margin-top: 0; letter-spacing: -.02em; }
        h3 { margin-top: 0; }
        p { line-height: 1.6; }
.panel {
    background: linear-gradient(159deg, var(--panel), var(--panel-2));
    border: 0.5px solid rgb(167 136 136 / 35%);
    border-radius: 10px;
    box-shadow: -8px 2px 5px 0.5px rgb(12 41 159 / 32%);
    padding: 20px;
    margin: 10px 0px;
    z-index: -1;
    position: relative;
}
        form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); text-align: left; }
        label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
        input, textarea, button { font: inherit; }
        input, textarea, select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0b1122; color: var(--ink); }
        textarea { min-height: 96px; resize: vertical; }
        .full { grid-column: 1 / -1; }
button {
    background: linear-gradient(276deg, #459ab7c4, #63a978b8);
    
    color: var(--ink);
    border: 0;
    border-radius: 11px;
    padding: 6px 15px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: .03em;
    transition: transform .05s, background .15s, box-shadow .05s;
    font-size: 12px;
}
    button:hover:not(:disabled) {
        box-shadow: #13538ac4 2px 2px 8px 1px; /* rgba(193, 15, 255, 0.55) 2px 2px 8px 1px;*/
        box-shadow: #25629545 -5px 5px 7px 0px, #2fb0745c 8px -2px 8px 1px;
        transition: 0.18s ease-in;
    }
        button:disabled { opacity: .6; cursor: wait; }
        .delete-button { background: linear-gradient(135deg, #ef4444, #f97316); padding: 8px 12px; }
        .delete-button:disabled { opacity: .6; }
        .delete-button.secondary { background: linear-gradient(135deg, #334155, #1f2937); }
        button.secondary { background: linear-gradient(135deg, #334155, #1f2937); box-shadow: none; }
        .status { margin-top: 12px; min-height: 24px; font-weight: 700; }
            .status.error {
                color: var(--bad);
                text-shadow: 2px 2px 0 #5c4ac58c, 1px 1px 3px #5d211cc9, 3px 3px 0 #89020224;
            }
            .status.success {
                color: var(--good);
                text-shadow: 2px 1px 0 #252b26db, 1px 2px 4px #1c5d37, 2px 2px 10px #003d052e;
            }
            .status.info {
                color: var(--brand-2);
                text-shadow: 2px 2px 0 #750f6091, 4px 1px 0 #53555930, 2px 2px 2px #20356194;
            }
        ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
        li { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
        .meta { color: var(--muted); font-size: 13px; margin-top: 8px; }
        .empty { color: #99a3bc; }
        .section-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.insights-tabs {
    height: 55px;
    margin: -55px -21px 7px; /* !!!!! ALSO WORKS !!!!!!! margin: -52px -21px 5px 5px;*/
}
        /*.insights-tabs { display: inline-flex; gap: 0; margin: -20px -20px 12px; padding: 0 20px 2px; border-bottom: 2px solid var(--line); align-self: stretch; }*/
.insights-tab {
    z-index: 1;
    transition: transform .2s ease-in-out, box-shadow .75s, color 0.53s ease-in-out !important;
    border: 0.5px solid rgb(167 136 136 / 35%);
    height: 48px !important;
    font-weight: 600;
    letter-spacing: .08em;
    padding: 15px 45px;
    border-radius: 14px 14px 1px 1px;
    position: relative;
    color: #d2c4de;
    background: linear-gradient(0deg, #12182a, #16243a);
    border-bottom: 0 !important;
    border-right: 0 !important;
}

    .insights-tab:hover {
        color: #d2c4de;
        transform: translateY(8px);
        box-shadow: rgb(10 136 117 / 50%) 0px -5px 20px -10px !important;
    }

    .insights-tab.active {
        color: rgb(255, 255, 255);
        transform: translateY(9px);
        box-shadow: rgb(10 136 117 / 45%) 0px -5px 20px -10px !important;
       
    }

    .search-settings-inline {
        margin-left: auto;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

        .search-settings-inline label {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: var(--muted);
            font-weight: 700;
        }

        .search-settings-inline input[type="number"] {
            width: 64px;
            padding: 6px 8px;
        }

    .pagination-actions {
        margin-top: 16px;
        padding-top: 6px;
    }

    .section-toolbar {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
        margin: 14px 0;
        padding: 10px;
        background: #0b1122;
        border: 1px solid var(--line);
        border-radius: 12px;
    }

        .section-toolbar label {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            font-weight: 700;
            color: var(--muted);
        }

        .section-toolbar input, .section-toolbar select {
            padding: 7px 9px;
            width: auto;
        }

            .section-toolbar input[type="number"] {
                width: 76px;
            }

            .section-toolbar input[type="search"] {
                min-width: 220px;
            }

    .state-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border-radius: 999px;
        padding: 6px 10px;
        font-size: 12px;
        font-weight: 750;
        background: #eef2ff;
        color: #3730a3;
    }

        .state-badge.running {
            background: #dcfce7;
            color: #166534;
        }

        .state-badge.stopped {
            background: #f1f5f9;
            color: #475569;
        }

        .state-badge.captcha {
            background: #fef3c7;
            color: #92400e;
        }

    .summary-list {
        list-style: decimal;
        margin: 12px 0 0 22px;
        padding: 0;
        display: block;
    }

        .summary-list li {
            margin-bottom: 6px;
            padding: 10px 12px;
            font-size: 13px;
            line-height: 1.35;
            white-space: normal;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

    .grid-two {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .company-list li {
        padding: 11px 12px;
    }

    .company-card {
        display: grid;
        gap: 8px;
    }

    .company-head {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
    }

    .company-title {
        font-size: 14px;
        font-weight: 800;
        line-height: 1.25;
    }

    .company-meta {
        margin-top: 0;
        font-size: 12px;
        line-height: 1.35;
    }

    .company-links {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        align-items: center;
    }

        .company-links a {
            color: #93c5fd;
            text-decoration: none;
            font-size: 12px;
        }

            .company-links a:hover {
                text-decoration: underline;
            }

    .company-actions {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        flex-wrap: wrap;
    }

        .company-actions .delete-button,
        .company-actions .view-button {
            padding: 7px 10px;
        }

        .company-actions .view-button {
            background: linear-gradient(135deg, #0f766e, #14b8a6);
        }

    .tab-button {
        background: #475569;
    }

        .tab-button.active {
            background: #1d4ed8;
        }

    .companies-tabs {
        display: inline-flex;
        gap: 6px;
        margin: 10px 0 12px;
        padding: 6px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: rgba(11,17,34,.55);
    }

.companies-tab {
    background: transparent;
    color: var(--muted);
    box-shadow: none;
    border: 1px solid transparent;
    padding: 8px 14px;
    transition: 0.1s;
    font-weight: 900;
}

        .companies-tab:hover:not(:disabled) {
            box-shadow: none;
            transition: 0.1s;
            color: #dbe4ff;
        }

        .companies-tab.active {
            background: linear-gradient(180deg, #1b2140, #151a33);
            color: #f3f5ff;
            border-color: rgba(136,145,167,.25);
        }

    .logs-list {
        margin-top: 10px;
        gap: 8px;
    }

        .logs-list li {
            border-left: 4px solid #94a3b8;
            padding: 10px 12px;
            background: rgba(248,250,252,.96);
            border: 1px solid rgba(203,213,225,.9);
            border-radius: 10px;
            box-shadow: none;
        }

            .logs-list li.warning {
                background: #fffbeb;
                border-color: #fde68a;
                border-left-color: #f59e0b;
            }

            .logs-list li.error {
                background: #fef2f2;
                border-color: #fecaca;
                border-left-color: #ef4444;
            }

            .logs-list li.fatal {
                background: #fee2e2;
                border-color: #fca5a5;
                border-left-color: #991b1b;
            }

            .logs-list li.information {
                background: #eff6ff;
                border-color: #bfdbfe;
                border-left-color: #3b82f6;
            }

    .log-row {
        display: grid;
        gap: 4px;
    }

    .log-header {
        display: flex;
        gap: 8px;
        align-items: baseline;
    }

    .log-pill {
        display: inline-flex;
        align-items: center;
        padding: 3px 8px;
        border-radius: 999px;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .03em;
        text-transform: uppercase;
    }

        .log-pill.information {
            background: #dbeafe;
            color: #1d4ed8;
        }

        .log-pill.warning {
            background: #fef3c7;
            color: #b45309;
        }

        .log-pill.error {
            background: #fee2e2;
            color: #b91c1c;
        }

        .log-pill.fatal {
            background: #fecaca;
            color: #7f1d1d;
        }

    .log-message {
        font-weight: 650;
        color: #0f172a;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        font-size: 13px;
    }

    .log-time-inline {
        color: #64748b;
        font-size: 11px;
        white-space: nowrap;
    }

    .log-actions {
        margin-top: 8px;
    }

    .logs-toolbar-compact {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        align-items: center;
        margin: 14px 0;
        padding: 10px;
        background: var(--soft);
        border: 1px solid var(--line);
        border-radius: 12px;
    }

        .logs-toolbar-compact label {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            font-weight: 700;
            color: var(--muted);
        }

        .logs-toolbar-compact select, .logs-toolbar-compact input {
            padding: 7px 9px;
            border-radius: 9px;
            border: 1px solid #cbd5e1;
        }

    .logs-cleanup-actions {
        display: flex;
        gap: 8px;
        align-items: center;
        flex-wrap: wrap;
        margin-top: 10px;
    }

    .logs-files-scroll {
        max-height: 180px;
        margin-top: 10px;
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 8px;
        background: rgba(11,17,34,.45);
    }

    .logs-file-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: grid;
        gap: 6px;
    }

    .logs-file-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 8px 10px;
        background: rgba(15,23,42,.35);
    }

    .logs-file-label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        color: #dbe2f1;
        font-weight: 700;
    }

    .logs-file-meta {
        color: var(--muted);
        font-size: 12px;
    }

    #logs-section {
        margin-top: 30px
    }

    #logs-section .logs-entries-scroll {
        max-height: calc(100vh - 460px);
    }

    .chip-row {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
        margin-top: 8px;
    }

    .chip {
        display: inline-flex;
        gap: 6px;
        align-items: center;
        padding: 6px 8px;
        border-radius: 999px;
        border: 1px solid rgba(148,163,184,.4);
        background: rgba(248,250,252,.9);
        color: #0f172a;
        font-size: 11px;
        font-weight: 700;
    }

        .chip strong {
            font-weight: 900;
        }

    .state-banner {
        display: flex;
        gap: 12px;
        align-items: center;
        flex-wrap: wrap;
        justify-content: space-between;
    }

        .state-banner .state-badge {
            font-size: 12px;
        }

    .log-details {
        max-height: 55vh;
        overflow: auto;
    }

    .log-details {
        margin-top: 10px;
        border-top: 1px dashed #cbd5e1;
        padding-top: 10px;
        white-space: pre-wrap;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        font-size: 12px;
        color: #0f172a;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 10px;
    }

    .log-actions {
        margin-top: 8px;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
    }

    .link-button {
        background: #475569;
        padding: 6px 10px;
        font-size: 12px;
    }

        .link-button:hover:not(:disabled) {
            background: #334155;
        }

    .log-meta {
        display: grid;
        gap: 6px;
        margin-top: 10px;
        color: #475569;
        font-size: 12px;
    }

    .log-level {
        font-weight: 700;
        margin-right: 8px;
    }

    .log-time {
        color: #64748b;
        font-size: 12px;
        margin-bottom: 6px;
    }

.top-header {
    border: 0.5px solid rgb(167 136 136 / 35%);
    box-shadow: -8px 2px 5px 0.5px rgb(12 41 159 / 72%);
    background: linear-gradient(325deg, #1c060a, #13244abf 850px);
    color: #e2e8f0;
    box-shadow: 0 7px 25px rgb(53 167 191 / 43%);
}

    .top-header-inner {
        padding: 5px 20px;
        display: flex;
        justify-content: space-between;
        min-width: 400px;
    }

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

    .header-title {
        font-weight: 750;
        letter-spacing: -.02em;
    }

    .admin-nav {
        display: none;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-left: auto;
    }

.header-refresh-controls {
    display: contents;
    /*align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, .75);
    border: 1px solid var(--line);*/
}

        .header-refresh-controls label {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            font-weight: 700;
            color: #cbd5e1;
        }

        .header-refresh-controls input {
            width: 76px;
            padding: 7px 9px;
        }

    .account-menu {
        position: relative;
    }

    .account-button {
        background: #1e293b;
        padding: 8px 12px;
    }

    .account-dropdown {
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
        min-width: 140px;
        padding: 8px;
        z-index: 10;
    }

        .account-dropdown button {
            width: 100%;
            text-align: left;
            background: #dc2626;
            padding: 8px 10px;
        }

    .hidden {
        display: none !important;
    }

    .login-view {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px 16px;
        box-sizing: border-box;
    }

    .login-container {
        width: 100%;
        max-width: 560px;
    }

        .login-container .panel {
            margin-top: 0;
        }
    /* parser artifacts removed */
    .page-heading {
        display: none;
    }

    .eyebrow {
        color: var(--brand-2);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .12em;
        text-transform: uppercase;
        margin-bottom: 8px;
    }

    .page-heading h1 {
        margin: 0;
        font-size: clamp(22px, 3vw, 32px);
    }

    .page-heading p {
        color: var(--muted);
        margin: 8px 0 0;
        max-width: 700px;
    }

    .page-state {
        text-align: right;
        color: var(--muted);
        font-size: 13px;
    }
    /* Sidebar layout */
    /*#app-view {
        max-width: none;
    }

    #app-view {
        width: 100%;
    }*/

#app-view {
    margin: 10px;
}

    #app-view {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        align-items: start;
        min-height: calc(100vh - 72px);
    }
#sidebar {
    background: linear-gradient(159deg, var(--panel), var(--panel-2));
    border: 0.5px solid rgb(167 136 136 / 35%);
    border-radius: 10px;
    box-shadow: -8px 2px 5px 0.5px rgb(12 41 159 / 32%);
    padding: 20px;
    margin: 10px 0px;
    z-index: -1;
    position: relative;
    z-index: 4;

    /*display: grid;
    grid-template-rows: auto 1fr;
    gap: 14px;
    background: linear-gradient(180deg, rgba(18, 24, 43, .95), rgba(15, 20, 38, .92));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 5px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, .35);*/
}

    .sidebar-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    #sidebar .brand {
        font-weight: 900;
        letter-spacing: -.02em;
        padding: 8px 10px 12px;
    }

    #sidebar nav {
        display: grid;
        gap: 8px;
        align-content: start;
    }

        #sidebar nav a {
            text-decoration: none;
            color: var(--ink);
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid transparent;
            background: rgba(11,17,34,.55);
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-weight: 800;
        }

            #sidebar nav a:hover {
                border-color: rgba(109,108,255,.35);
            }

            #sidebar nav a.active {
                background: linear-gradient(135deg, rgba(109,108,255,.35), rgba(17,179,255,.18));
                border-color: rgba(109,108,255,.45);
            }

    .sidebar-toggle {
        white-space: nowrap;
    }

    body.sidebar-collapsed #app-view {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    body.sidebar-collapsed #sidebar .sidebar-top {
        flex-direction: column;
        align-items: stretch;
    }

    body.sidebar-collapsed #sidebar .brand {
        padding-bottom: 4px;
        text-align: center;
        font-size: 13px;
    }

    body.sidebar-collapsed #sidebar nav a {
        justify-content: center;
        text-align: center;
        font-size: 12px;
        line-height: 1.25;
        padding-inline: 8px;
    }

.main-col {
    z-index:1;
    padding: 12px;
}

#app-status {
    position: relative;
    z-index: 50;
    font-size: 17px;
    float: right;
    margin: -15px 15px -50px 0px;
    /*text-shadow: 2px 1px 0 #53555930, 1px 2px 4px #53555930, 2px 2px 10px #53555930;*/
}

    @media (max-width: 980px) {
        #app-view {
            grid-template-columns: 1fr;
            min-height: auto;
        }

        #sidebar {
            padding-right: 15px;
            position: static;
            min-height: auto;
            max-height: 200px;
        }

        body.sidebar-collapsed #app-view {
            grid-template-columns: 1fr;
        }
    }
    /* Desktop app shell: fix the shell to the viewport height so only the content pane scrolls,
           never the whole document. This keeps the sidebar/header always visible on full-HD monitors. */
    @media (min-width: 981px) {
        html, body {
            /*overflow: hidden;*/
        }

        #app-view {
            /*height: calc(100vh - 72px);*/
            min-height: 0;
            align-items: stretch;
            overflow: hidden;
        }

        #sidebar {
            position: static;
            top: auto;
        }

        .main-col {
            height: 100%;
            overflow-y: auto;
            padding-right: 6px;
        }
    }
    /* Scraping dashboard layout */
    .scraping-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        align-items: start;
        width: 100%;
        max-width: 1280px;
        margin: 0 auto;
    }

    .scraping-col {
        min-width: 0;
    }

    .scraping-layout > .scraping-col:first-child {
        display: block;
    }

    #search-insights, #companies-section, #captcha-panel {
        margin-top: 0;
    }

    #search-insights, #companies-section {
        height: calc(100vh - 150px);
        min-height: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    #insights-step1-view, #insights-step2-view {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #search-insights .panel-scroll, #companies-section .panel-scroll {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-x: hidden;
        overflow-y: auto;
    }

    #search-insights {
        grid-column: 1;
    }

    #companies-section {
        grid-column: 1;
    }

    .scraping-layout > .scraping-col:last-child {
        grid-column: 1;
    }

    .panel-scroll {
        max-height: calc(100vh - 420px);
        overflow: auto;
    }

        .panel-scroll::-webkit-scrollbar {
            width: 10px;
            height: 10px;
        }

        .panel-scroll::-webkit-scrollbar-thumb {
            background: rgba(136,145,167,.35);
            border-radius: 999px;
        }

        .panel-scroll::-webkit-scrollbar-track {
            background: rgba(136,145,167,.10);
            border-radius: 999px;
        }

    .progress-hero {
        display: grid;
        gap: 10px;
        margin-top: 10px;
    }

    .progress-row {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
    }

    .progress-kpi-row {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .progress-kpi {
        font-size: 14px;
        font-weight: 850;
    }

    #search-insights .progress-kpi-row .state-badge {
        padding: 3px 8px;
        font-size: 10px;
    }

    .progress-bar {
        height: 10px;
        border-radius: 999px;
        background: rgba(136,145,167,.18);
        overflow: hidden;
        border: 1px solid rgba(136,145,167,.25);
    }

        .progress-bar > div {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, rgba(109,108,255,.85), rgba(17,179,255,.85));
        }

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

            .scraping-layout > .scraping-col:first-child {
                display: block;
            }

            #search-insights, #companies-section, .scraping-layout > .scraping-col:last-child {
                grid-column: auto;
            }

        #companies-section, #captcha-panel {
            margin-top: 18px;
        }
    }

    .size-picker {
        display: inline-flex;
        gap: 6px;
        align-items: center;
        padding: 6px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(11,17,34,.55);
    }

        .size-picker button {
            padding: 6px 9px;
            border-radius: 10px;
            font-weight: 900;
            font-size: 12px;
            box-shadow: none;
        }

            .size-picker button.active {
                background: linear-gradient(135deg, rgba(109,108,255,.95), rgba(17,179,255,.85));
            }

        .size-picker input {
            width: 74px;
            padding: 6px 8px;
            border-radius: 10px;
        }

    .captcha-inline-alert {
        margin-top: 10px;
        padding: 10px 12px;
        border-radius: 12px;
        border: 1px solid rgba(245,158,11,.45);
        background: rgba(245,158,11,.1);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        flex-wrap: wrap;
    }

        .captcha-inline-alert strong {
            color: #fde68a;
            font-size: 13px;
        }
    /* Pinned CAPTCHA */
    #captcha-panel {
        position: static;
    }

    .section-heading h2 {
        display: block;
        font-size: 18px;
        margin: 0;
        font-weight: bold;
        unicode-bidi: isolate;
    }

    .section-heading {
        gap: 8px;
        margin: 15px 0px;
    }

        .section-heading p {
            margin-top: 2px;
            font-size: 12px;
            line-height: 1.3;
        }
    /* Danger zone */
    .danger-callout {
        background: rgba(239,68,68,.08);
        border: 1px solid rgba(239,68,68,.24);
        border-radius: 14px;
        padding: 12px 14px;
        color: rgba(239,68,68,.92);
        font-weight: 750;
    }

    .danger-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        align-items: center;
        margin-top: 12px;
    }

        .danger-actions input {
            min-width: 240px;
        }

    .section-heading {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 16px;
        margin: 15px 0px;
    }

    #search-insights .section-heading, #companies-section .section-heading {
        gap: 8px;
        margin: 15px 0px;
    }

        #search-insights .section-heading p, #companies-section .section-heading p {
            margin-top: 2px;
            font-size: 12px;
            line-height: 1.3;
            color: var(--muted);
        }

    .captcha-grid {
        display: grid;
        grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr);
        gap: 20px;
        align-items: start;
    }

    .captcha-preview {
        display: grid;
        gap: 10px;
        justify-items: start;
    }

        .captcha-preview img {
            max-width: 100%;
            min-height: 92px;
            object-fit: contain;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            padding: 8px;
            background: #fff;
        }

    .captcha-details {
        display: grid;
        gap: 8px;
    }

    .detail-row {
        display: grid;
        grid-template-columns: 130px 1fr;
        gap: 12px;
        padding: 8px 0;
        border-bottom: 1px solid var(--line);
        font-size: 13px;
    }

        .detail-row strong {
            color: var(--muted);
        }

    .ocr-field {
        background: #f1f5f9;
        color: #64748b;
    }

    .company-detail-page {
        display: grid;
        gap: 16px;
        align-self: stretch;
        width: 100%;
        margin-top: 0;
    }

    .company-detail-header {
        display: flex;
        gap: 12px;
        align-items: flex-start;
        justify-content: space-between;
    }

        .company-detail-header h2 {
            margin: 4px 0 0;
        }

    .company-detail-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        align-items: center;
    }

    .company-detail-meta {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
        color: var(--muted);
        font-size: 12px;
        margin-top: 6px;
    }

    .company-detail-body {
        display: grid;
        gap: 14px;
    }

        .company-detail-body .panel {
            margin-top: 0;
        }

    .company-detail-page .detail-row {
        grid-template-columns: 180px 1fr;
        background: rgba(11,17,34,.5);
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 10px 12px;
    }

        .company-detail-page .detail-row span {
            word-break: break-word;
        }

    .company-detail-summary {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .company-detail-grid {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .company-summary-card {
        background: rgba(11,17,34,.45);
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 14px;
        display: grid;
        gap: 8px;
    }

    .company-summary-label {
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .02em;
        text-transform: uppercase;
    }

    .company-summary-value {
        font-size: 15px;
        font-weight: 800;
        word-break: break-word;
    }

    .company-chip-row {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .company-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 7px 10px;
        border-radius: 999px;
        background: rgba(109,108,255,.16);
        border: 1px solid rgba(109,108,255,.35);
        color: #dbe4ff;
        font-size: 12px;
        font-weight: 700;
    }

        .company-chip.muted {
            background: rgba(148,163,184,.12);
            border-color: rgba(148,163,184,.25);
            color: #e2e8f0;
        }

    .company-detail-table {
        width: 100%;
        border-collapse: collapse;
        overflow: hidden;
        border-radius: 12px;
    }

        .company-detail-table th, .company-detail-table td {
            padding: 10px 12px;
            border-bottom: 1px solid var(--line);
            text-align: left;
            font-size: 12px;
            vertical-align: top;
        }

        .company-detail-table th {
            background: rgba(11,17,34,.7);
            color: #dbe2f1;
            position: sticky;
            top: 0;
        }

        .company-detail-table td {
            background: rgba(15,23,42,.45);
        }

    .company-links-row {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    .company-link-chip {
        display: inline-flex;
        align-items: center;
        padding: 7px 10px;
        border-radius: 999px;
        background: rgba(14,165,233,.12);
        border: 1px solid rgba(14,165,233,.3);
        color: #bae6fd;
        text-decoration: none;
        font-size: 12px;
        font-weight: 700;
    }

        .company-link-chip:hover {
            text-decoration: underline;
        }

    .company-note {
        white-space: pre-wrap;
        line-height: 1.55;
        color: #dbe2f1;
    }

    @media (max-width: 900px) {
        .company-detail-summary {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (max-width: 720px) {
        .top-header-inner, .page-heading {
            align-items: flex-start;
            flex-direction: column;
        }

        .page-state {
            text-align: left;
        }

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

        .company-detail-summary {
            grid-template-columns: 1fr;
        }

        .company-detail-page .detail-row {
            grid-template-columns: 1fr;
        }

        .company-detail-header {
            flex-direction: column;
            align-items: stretch;
        }
    }

