.admin_button {
    min-width: 3vw;
    font-size: 1vw;
}

.admin_big_button {
    min-width: 4vw;
    font-size: 1vw;
}

#result_table {
    display: none;
}

#user_password:hover {
    cursor: default;
    color: inherit;
}

a {
    color:#F9A825;
    text-decoration:none;
}

a:hover {
    color: #e89d24;
}

#ssn_container {
    margin: 0;
    margin-left: 5px;
}

#zero_results {
    text-align: center;
    display: none;
}

#error {
    text-align: center;
    color: red;
}

#menu {
    text-align:center;
    margin-bottom: 2%;
}

select {
    margin-left:5px;
    padding:1px;
    height:50%;
    box-sizing: content-box;
}

table {
    border-collapse: collapse;
    margin: 0 auto;
    color: #EEEEEE;
    margin-top: 2%;
    /*font-size: 1.2vw;*/
}

td {
    border: 1px solid #EEEEEE;
    padding: 10px;
    cursor: pointer;
}

.centered {
    text-align: center;
}

input {
    margin: 2px;
    /* width: 90%; */
    margin-left: 5px;
    font-family: verdana;
    /*font-size: 1vw;*/
}

label {
    margin-left: 10px;
}

body {
    background-color: #222831;
    color: #EEEEEE;
    margin-bottom:20%;
    font-family: verdana;
   /* font-size: 1.2vw;*/
}

form {
    display: flex;
    align-items: center;
    justify-content: center;
}

h1 {
    margin-top: 2%;
    cursor: pointer;
}

h3 {
    text-align: center;
    margin-top: 2%;
}

#loader {
    display: none;
    width: 24px;
    height: 24px;
    margin: 16px auto;
    border: 3px solid #334050;
    border-radius: 50%;
    border-top-color: #f4ad31;
    animation: spin 0.8s linear infinite;
}

.external-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 38px;
    margin: 12px 0;
    color: #aebaca;
    font-size: 12px;
}

.external-loader.is-visible {
    display: flex;
}

.external-loader-mark {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 3px solid #334050;
    border-top-color: #f4ad31;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.container {
    width: 100%;
    max-width: 60vw;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Gap between items */
}

.search_parameter {
    width: calc(25% - 10px); /* 20% width for each item */
    display: flex;
    flex-direction: column;
}

.search_parameter label {
    margin-bottom: 5px;
}

.search_parameter input {
    padding: 5px;
}

.button-container {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    margin:auto;
    flex-direction: row;
    gap: 10px;
    min-width: fit-content;
    margin-top: 10px;
}

button {
    cursor:pointer;
    font-weight:bold;
    border-radius:5px;
    text-align:center;
    padding:5px 0px;
    /*font-size:18px;*/
    min-width: 10vw;
    color:#222831;
    margin-right: 5px;
    font-family: verdana;
    /*font-size: 1.2vw;*/
}

.search_button {
    background-color:#F9A825;
}

.search_button:hover {
    background-color: #e89d24;
}

#load_next_button {
    background-color:#F9A825;
    margin-top:2%;
    display: none;
}

#load_next_button:hover {
    background-color: #e89d24;
}

.ssn {
    cursor: pointer;
   /* text-decoration: underline;*/
}

.divider {
    font-size: 2vw;
    display: flex;
    align-items: center;
    width: 50%;
    margin: 0 auto;
    font-weight: bold;
  }

.divider::before, .divider::after {
    flex: 1;
    content: '';
    padding: 2px;
    margin: 5px;
    background-color: #F9A825;
    margin-left: 2%;
    margin-right: 2%;
}

#pay_button {
    cursor:pointer;
    font-weight:bold;
    border-radius:5px;
    background-color:#F9A825;
    color:#222831;
    text-align:center;
    padding:5px 15px;
    /*font-size:18px;*/
}

input.login {
    padding: 5px;
    font-size: 14px;
    width: 20%;
}

#login_button {
    cursor:pointer;
    font-weight:bold;
    border-radius:5px;
    background-color:#F9A825;
    color:#222831;
    text-align:center;
    padding:5px 15px;
    font-size:18px
}

/* STYX floating promo */
a.styx-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 92px;
    padding: 12px 16px 10px;
    text-decoration: none;
    border-radius: 16px;
    background: linear-gradient(165deg, #2a2a2e 0%, #0d0d0f 55%, #050506 100%);
    border: 1px solid rgba(210, 215, 225, 0.28);
    opacity: 0.38;
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -1px 0 rgba(0, 0, 0, 0.45);
    transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

a.styx-fab:hover,
a.styx-fab:focus-visible {
    opacity: 1;
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(235, 238, 245, 0.55);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.6),
        0 0 22px rgba(180, 190, 210, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

a.styx-fab .styx-word {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.28em;
    line-height: 1;
    padding-right: 0.28em;
    background: linear-gradient(180deg, #ffffff 0%, #e8eaef 28%, #a8adb8 62%, #7a808c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.25));
}

a.styx-fab .styx-meta {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(190, 196, 208, 0.72);
}

@media (max-width: 520px) {
    a.styx-fab {
        right: 12px;
        bottom: 12px;
        min-width: 84px;
        padding: 10px 14px 9px;
    }
    a.styx-fab .styx-word { font-size: 15px; }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #171b22;
    color: #e8edf2;
    font-family: Verdana, Geneva, sans-serif;
}

.app-shell {
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 14px;
    background: #10141a;
    border-right: 1px solid #2e3846;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand:hover {
    color: #ffffff;
}

.brand-accent,
a,
.text-button {
    color: #f4ad31;
}

.account-block {
    display: grid;
    gap: 7px;
    padding: 10px;
    background: #171d25;
    border: 1px solid #334050;
    border-radius: 6px;
}

.account-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.account-status-row span {
    color: #9ca8b8;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.account-status-row strong {
    overflow: hidden;
    max-width: 92px;
    font-size: 12px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-label,
.eyebrow,
.panel-label {
    color: #9ca8b8;
    font-size: 12px;
    text-transform: uppercase;
}

.nav-menu {
    display: grid;
    gap: 16px;
}

.nav-section {
    display: grid;
    gap: 4px;
}

.nav-section-title {
    height: 1px;
    margin: 7px 9px 10px;
    overflow: hidden;
    background: #2f3948;
    color: transparent;
    font-size: 0;
}

.nav-menu a,
.nav-disabled,
.logout-link {
    display: block;
    padding: 9px 10px;
    border-radius: 6px;
    color: #dbe3ec;
    font-size: 14px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #273241;
    color: #ffffff;
}

.nav-disabled {
    color: #6f7a88;
}

.quick-links {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding-top: 3px;
}

.quick-links a {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 9px 6px;
    border: 1px solid #334050;
    background: #171d25;
    color: #c7d0dc;
    font-size: 11px;
    text-align: center;
}

.quick-links a:hover {
    border-color: #6ab6b8;
    background: #1f2c37;
    color: #ffffff;
}

.telegram-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: #1f8fca;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 7px;
}

.logout-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #4a3840;
    background: #211a20;
    color: #ffb7b7;
    font-weight: 700;
}

.logout-link:hover {
    border-color: #874848;
    background: #2b2023;
    color: #ffffff;
}

.app-version {
    color: #6f7a88;
    font-size: 10px;
    text-align: center;
    letter-spacing: 0.04em;
}

.main-panel {
    min-width: 0;
}

.topbar {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 24px;
    border-bottom: 1px solid #2e3846;
    background: #1d232d;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
    color: #9ca8b8;
    font-size: 12px;
    text-transform: uppercase;
}

.breadcrumbs strong {
    color: #e8edf2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb-separator {
    color: #566274;
}

.env-badge {
    padding: 6px 10px;
    border: 1px solid #6ab6b8;
    border-radius: 8px;
    color: #9ee6e6;
    font-size: 12px;
    font-weight: 700;
}

.content-area {
    width: min(1240px, calc(100vw - 236px));
    margin: 0 auto;
    padding: 14px 20px 28px;
}

.workspace-section,
.search-panel,
.info-section,
.metric-panel,
.code-block {
    border: 1px solid #334050;
    border-radius: 8px;
    background: #202733;
}

.workspace-section {
    padding: 10px;
    background: transparent;
    border-color: #2b3543;
}

.search-panel {
    display: grid;
    width: 100%;
    gap: 8px;
    padding: 10px;
    background: #1d2430;
}

.compact-panel {
    margin-top: 10px;
}

.centered-panel {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.form-section {
    width: 100%;
    min-width: 0;
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
}

.form-section legend {
    width: 100%;
    padding: 0 0 6px;
    margin-bottom: 8px;
    color: #f4ad31;
    border-bottom: 1px solid #344050;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

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

.form-grid.compact {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
}

.direct-identifier-grid {
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.direct-identifier-grid .search_parameter,
.direct-identifier-grid .button-container {
    grid-column: span 6;
}

.direct-identifier-grid .button-container {
    justify-content: center;
}

.search_parameter {
    min-width: 0;
    width: auto;
    display: grid;
    grid-column: span 3;
    gap: 4px;
}

.search_parameter.wide {
    grid-column: span 5;
}

.search_parameter.small {
    grid-column: span 2;
    min-width: 0;
}

.search_parameter label {
    margin: 0;
    color: #c7d0dc;
    font-size: 12px;
}

input,
select {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    height: auto;
    min-height: 31px;
    margin: 0;
    padding: 5px 8px;
    border: 1px solid #495668;
    border-radius: 6px;
    background: #111820;
    color: #eef3f8;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 12px;
}

select {
    appearance: none;
    cursor: pointer;
    padding-right: 28px;
    background:
        linear-gradient(45deg, transparent 50%, #f4ad31 50%) right 13px center / 6px 6px no-repeat,
        linear-gradient(135deg, #f4ad31 50%, transparent 50%) right 8px center / 6px 6px no-repeat,
        #111820;
}

select:hover,
input:hover {
    border-color: #66758a;
}

select:focus,
input:focus {
    outline: 1px solid #f4ad31;
    border-color: #f4ad31;
}

select option {
    background: #111820;
    color: #eef3f8;
}

input::placeholder {
    color: #6f7a88;
}

.button-container {
    grid-column: span 3;
    justify-content: flex-start;
    margin: 0;
    gap: 6px;
}

.form-actions {
    grid-column: 1 / -1;
    justify-content: center;
}

button,
#login_button,
#pay_button,
#load_next_button {
    min-width: 96px;
    min-height: 31px;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
}

.secondary-button {
    background: #394555;
    color: #eef3f8;
}

.secondary-button:hover {
    background: #465468;
}

.divider {
    width: min(420px, 100%);
    margin: 10px auto;
    font-size: 12px;
    color: #9ca8b8;
}

.result-status {
    min-height: 24px;
    margin: 10px 0 8px;
    font-size: 14px;
}

.external-summary {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #202733;
}

.summary-main,
.summary-metrics {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-main strong { color: #ffffff; }
.summary-main span,
.summary-metrics span { color: #aebaca; font-size: 12px; }
.summary-kicker { color: #f4ad31 !important; text-transform: uppercase; font-weight: 700; }
.summary-metrics b { color: #f4ad31; }

.result-tabs {
    display: flex;
    gap: 4px;
    margin: 12px 0 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #f4ad31 #111820;
}

.result-tab {
    min-width: auto;
    padding: 7px 12px;
    border: 1px solid #3b485b;
    border-radius: 6px;
    background: #202733;
    color: #b9c4d2;
    font-size: 12px;
    white-space: nowrap;
}

.result-tab:hover,
.result-tab.active {
    border-color: #f4ad31;
    background: #303b4c;
    color: #ffffff;
}

.result-panel { display: none; }
.result-panel.active { display: block; }
.overview-note { color: #9ca8b8; font-size: 12px; }

.overview-empty-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid #79602f;
    border-radius: 8px;
    background: #2b281f;
    color: #dfe7f0;
}

.overview-empty-notice-icon {
    display: grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: #f4ad31;
    color: #202733;
    font-size: 14px;
    font-weight: 800;
}

.overview-empty-notice strong {
    display: block;
    margin-bottom: 3px;
    color: #ffffff;
    font-size: 14px;
}

.overview-empty-notice p {
    margin: 0;
    color: #b9c4d2;
    font-size: 12px;
    line-height: 1.45;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.overview-card {
    display: grid;
    align-content: start;
    gap: 5px;
    min-height: 112px;
    padding: 12px;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #202733;
}

.overview-card-primary {
    border-color: #c58a27;
    background: linear-gradient(145deg, #2a303b, #202733);
}

.overview-card-label {
    color: #f4ad31;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.overview-card strong {
    color: #ffffff;
    font-size: 16px;
}

.overview-card span:not(.overview-card-label) {
    color: #aebaca;
    font-size: 12px;
}

.overview-card .overview-value {
    color: #dfe7f0;
}

.overview-card .overview-value-muted {
    color: #e0b968;
}

.result-empty-state {
    display: grid;
    gap: 4px;
    padding: 24px;
    border: 1px dashed #465267;
    border-radius: 8px;
    background: #1b222c;
    text-align: center;
}

.result-empty-state strong { color: #ffffff; }
.result-empty-state span { color: #9ca8b8; font-size: 12px; }

.investigation-summary h2 {
    margin: 4px 0;
    color: #ffffff;
    font-size: 20px;
}

.investigation-summary p {
    margin: 0;
    color: #9ca8b8;
    font-size: 12px;
    line-height: 1.5;
}

.investigation-form {
    display: grid;
    align-items: stretch;
    justify-content: stretch;
}

.investigation-ssn-section {
    max-width: 360px;
    margin: 0 auto;
}

.investigation-form fieldset:not(.investigation-ssn-section) {
    transition: opacity 160ms ease;
}

.investigation-form.ssn-mode fieldset:not(.investigation-ssn-section) {
    opacity: 0.42;
    pointer-events: none;
}

.investigation-form-compact {
    gap: 7px;
    padding: 10px 12px;
}

.investigation-search-tabs {
    display: inline-flex;
    width: fit-content;
    gap: 2px;
    padding: 3px;
    border: 1px solid #344050;
    border-radius: 8px;
    background: #151b23;
}

.investigation-search-tab {
    min-height: 27px;
    padding: 4px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #9ca8b8;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.investigation-search-tab.active {
    background: #263142;
    color: #f4ad31;
}

.investigation-mode-panel {
    display: none;
    gap: 7px;
}

.investigation-mode-panel.active {
    display: grid;
}

.investigation-mode-row {
    display: grid;
    grid-template-columns: minmax(210px, 260px) auto minmax(0, 1fr);
    align-items: end;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #344050;
}

.investigation-ssn-section,
.investigation-identity-section {
    min-width: 0;
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.investigation-ssn-section {
    max-width: none;
}

.investigation-ssn-section legend,
.investigation-identity-section legend {
    padding: 0;
    color: #f4ad31;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.investigation-ssn-section legend {
    margin-bottom: 4px;
}

.investigation-identity-section legend {
    margin-bottom: 6px;
}

.investigation-ssn-field,
.investigation-field-grid .search_parameter {
    grid-column: auto;
    min-width: 0;
    gap: 3px;
}

.investigation-form-compact .search_parameter label {
    font-size: 10px;
}

.investigation-form-compact input,
.investigation-form-compact select,
.investigation-form-compact .custom-select-button {
    min-width: 0;
    min-height: 29px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.investigation-form-compact .custom-select {
    min-width: 0;
}

.investigation-or {
    display: flex;
    align-items: center;
    height: 29px;
    color: #6f7a88;
    font-size: 10px;
    font-weight: 700;
}

.investigation-mode-help {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-height: 29px;
    padding-bottom: 5px;
}

.investigation-mode-help strong {
    color: #e8edf2;
    font-size: 12px;
}

.investigation-mode-help span {
    color: #7f8b9b;
    font-size: 10px;
}

.investigation-field-grid {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(104px, 0.75fr) minmax(210px, 1.55fr) minmax(120px, 0.9fr) minmax(82px, 0.55fr) minmax(86px, 0.6fr);
    gap: 7px;
}

.investigation-field-grid-ssn {
    grid-template-columns: minmax(180px, 260px) auto;
    align-items: end;
}

.investigation-field-grid-ssn .investigation-actions {
    grid-column: auto;
    align-self: end;
    align-items: end;
    justify-content: flex-start;
    padding-top: 0;
}

.investigation-field-grid-partial {
    grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) minmax(84px, 0.7fr) minmax(112px, 0.9fr) minmax(190px, 1.35fr) minmax(110px, 0.9fr) minmax(82px, 0.55fr) minmax(86px, 0.6fr);
}

.investigation-actions {
    justify-content: flex-end;
    padding-top: 1px;
}

.investigation-actions button {
    min-height: 29px;
    padding: 4px 10px;
    font-size: 12px;
}

.pipeline-status {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 10px;
}

.pipeline-step {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #1b222c;
}

.pipeline-step > span {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: #303b4c;
    color: #b9c4d2;
    font-size: 10px;
    font-weight: 800;
}

.pipeline-step div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.pipeline-step strong {
    overflow: hidden;
    color: #e8edf2;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pipeline-step small {
    overflow: hidden;
    color: #8f9baa;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pipeline-step-done { border-color: #3f694d; }
.pipeline-step-done > span { background: #31553d; color: #a8edb9; }
.pipeline-step-empty { border-color: #5a5360; }
.pipeline-step-error { border-color: #7d4141; }
.pipeline-step-error > span { background: #643737; color: #ffb2b2; }

.pipeline-message {
    display: grid;
    gap: 4px;
    margin: 10px 0;
    padding: 12px 14px;
    border: 1px solid #465267;
    border-radius: 8px;
    background: #202733;
}

.pipeline-message strong { color: #ffffff; font-size: 13px; }
.pipeline-message span { color: #aebaca; font-size: 12px; line-height: 1.45; }
.pipeline-message-error { border-color: #874848; background: #2b2023; }
.pipeline-message-warning { border-color: #79602f; background: #2b281f; }

.investigation-summary {
    margin: 10px 0;
    padding: 16px;
    border: 1px solid #c58a27;
    border-radius: 10px;
    background: linear-gradient(145deg, #2a303b, #202733);
}

.investigation-summary-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.pipeline-badge {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid #596579;
    border-radius: 999px;
    color: #c7d0dc;
    font-size: 11px;
    font-weight: 700;
}

.pipeline-badge-success { border-color: #4f8b60; background: #274331; color: #a8edb9; }
.pipeline-badge-neutral { border-color: #79602f; background: #38301f; color: #f2cf82; }

.investigation-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.investigation-facts div {
    display: grid;
    gap: 4px;
    padding: 10px;
    border-radius: 7px;
    background: #151b23;
}

.investigation-facts span {
    color: #8f9baa;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.investigation-facts strong {
    overflow: hidden;
    color: #f4f7fa;
    font-size: 13px;
    text-overflow: ellipsis;
}

.investigation-table { min-width: 920px; }
.investigation-table-wide { min-width: 1120px; }

.dossier-card {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.dossier-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.dossier-block,
.related-person-card {
    display: grid;
    min-width: 0;
    gap: 8px;
    padding: 12px;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #1b222c;
}

.dossier-block-primary {
    border-color: #79602f;
    background: #222733;
}

.dossier-block h3,
.related-person-card h3 {
    overflow: hidden;
    margin: 0;
    color: #ffffff;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dossier-list {
    display: grid;
    gap: 6px;
    margin: 0;
}

.dossier-list div {
    display: flex;
    min-width: 0;
    justify-content: space-between;
    gap: 12px;
}

.dossier-list dt {
    flex: 0 0 auto;
    color: #8f9baa;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.dossier-list dd {
    overflow: hidden;
    margin: 0;
    color: #e8edf2;
    font-size: 12px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dossier-line {
    overflow: hidden;
    color: #ffffff;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dossier-muted {
    margin: 0;
    color: #9ca8b8;
    font-size: 12px;
    line-height: 1.45;
}

.dossier-compact-list,
.related-people-grid {
    display: grid;
    gap: 8px;
}

.dossier-mini-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.1fr) minmax(160px, 0.9fr) minmax(240px, 1.4fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #171d25;
}

.dossier-mini-row strong,
.dossier-mini-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dossier-mini-row strong {
    color: #f4f7fa;
    font-size: 13px;
}

.dossier-mini-row span {
    color: #aebaca;
    font-size: 12px;
}

.related-people-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 10px;
}

.investigation-candidates {
    margin-top: 10px;
}

.candidate-select-form {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.candidate-select-form .search_button {
    min-height: 27px;
    padding: 4px 9px;
    font-size: 11px;
}

.pipeline-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #171d25;
}

.pipeline-loader.is-visible { display: flex; }
.pipeline-loader div { display: grid; gap: 2px; }
.pipeline-loader strong { color: #ffffff; font-size: 13px; }
.pipeline-loader small { color: #9ca8b8; font-size: 11px; }

.investigation-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(5, 9, 14, 0.72);
}

.investigation-confirm-modal.is-visible {
    display: grid;
}

.investigation-confirm-dialog {
    display: grid;
    gap: 12px;
    width: min(460px, 100%);
    padding: 18px;
    border: 1px solid #79602f;
    border-radius: 8px;
    background: #202733;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.investigation-confirm-dialog h3,
.investigation-confirm-dialog p {
    margin: 0;
}

.investigation-confirm-dialog h3 {
    color: #ffffff;
    font-size: 17px;
}

.investigation-confirm-dialog p {
    color: #aebaca;
    font-size: 13px;
    line-height: 1.5;
}

.investigation-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.subscription-token-actions,
.subscription-token-modal-actions {
    display: flex;
    gap: 8px;
}

.subscription-token-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(5, 9, 14, 0.72);
}

.subscription-token-modal.is-visible {
    display: grid;
}

.subscription-token-dialog {
    display: grid;
    gap: 16px;
    width: min(460px, 100%);
    padding: 18px;
    border: 1px solid #79602f;
    border-radius: 8px;
    background: #202733;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.subscription-token-dialog h3 {
    margin: 0;
    color: #ffffff;
    font-size: 17px;
}

.subscription-token-dialog code {
    overflow-wrap: anywhere;
    color: #eef3f8;
    font-size: 15px;
    line-height: 1.5;
}

.subscription-token-modal-actions {
    justify-content: flex-end;
}

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

@media (max-width: 920px) {
    .investigation-mode-row { grid-template-columns: minmax(180px, 240px) auto minmax(0, 1fr); }
    .investigation-field-grid,
    .investigation-field-grid-partial { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .investigation-field-grid-ssn { grid-template-columns: minmax(180px, 260px) auto; }
    .investigation-address { grid-column: span 2 !important; }
    .dossier-grid,
    .related-people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dossier-mini-row { grid-template-columns: 1fr; }
    .pipeline-status,
    .investigation-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .subscription-token-actions,
    .subscription-token-modal-actions {
        width: 100%;
    }
    .subscription-token-actions button,
    .subscription-token-modal-actions button {
        flex: 1;
    }
    .investigation-mode-row { grid-template-columns: 1fr; align-items: stretch; }
    .investigation-or { height: auto; }
    .investigation-mode-help { display: grid; min-height: 0; padding: 0; }
    .investigation-search-tabs { width: 100%; }
    .investigation-search-tab { flex: 1; }
    .investigation-field-grid,
    .investigation-field-grid-partial,
    .investigation-field-grid-ssn { grid-template-columns: 1fr; }
    .investigation-address { grid-column: auto !important; }
    .investigation-actions { justify-content: stretch; }
    .investigation-actions button { flex: 1; }
    .dossier-grid,
    .related-people-grid { grid-template-columns: 1fr; }
    .pipeline-status,
    .investigation-facts { grid-template-columns: 1fr; }
    .investigation-summary-heading { flex-direction: column; }
}

@media (max-width: 760px) {
    .external-summary { display: grid; }
    .summary-main, .summary-metrics { flex-wrap: wrap; }
    .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .investigation-plan-card {
        grid-template-columns: 1fr;
    }
    .investigation-price-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .overview-grid { grid-template-columns: 1fr; }
}

.result-table-wrap {
    max-height: 56vh;
    overflow: auto;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #151b23;
    scrollbar-width: thin;
    scrollbar-color: #f4ad31 #111820;
}

.result-table-wrap::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.result-table-wrap::-webkit-scrollbar-track {
    border-radius: 8px;
    background: #111820;
}

.result-table-wrap::-webkit-scrollbar-thumb {
    border: 2px solid #111820;
    border-radius: 8px;
    background: #f4ad31;
}

.result-table-wrap::-webkit-scrollbar-thumb:hover {
    background: #ffc04d;
}

.matched-record td {
    background: rgba(244, 173, 49, 0.16) !important;
    box-shadow: inset 0 1px 0 rgba(244, 173, 49, 0.35), inset 0 -1px 0 rgba(244, 173, 49, 0.35);
}

.matched-record td:first-child {
    box-shadow: inset 3px 0 0 #f4ad31, inset 0 1px 0 rgba(244, 173, 49, 0.35), inset 0 -1px 0 rgba(244, 173, 49, 0.35);
}

.result-section-title {
    margin: 16px 0 8px;
    color: #f4ad31;
    font-size: 13px;
    text-align: left;
    text-transform: uppercase;
}

.raw-response-panel {
    margin-top: 14px;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #151b23;
}

.raw-response-panel summary {
    padding: 10px 12px;
    cursor: pointer;
    color: #f4ad31;
    font-size: 12px;
    font-weight: 700;
}

.raw-response-panel pre {
    max-height: 420px;
    margin: 0;
    padding: 12px;
    overflow: auto;
    border-top: 1px solid #334050;
    color: #cbd5e1;
    font: 11px/1.5 Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.result-table-wide {
    min-width: 1320px;
    font-size: 11px;
}

.result-table-wide th,
.result-table-wide td {
    padding: 5px 6px;
}

.driver-records-table {
    min-width: 0;
    width: auto;
    table-layout: auto;
    font-size: 11px;
}

.driver-records-table th,
.driver-records-table td {
    padding: 5px 6px;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.driver-records-table th,
.driver-records-table td {
    min-width: 86px;
}

.driver-records-table th:nth-child(3),
.driver-records-table td:nth-child(3) {
    min-width: 180px;
}

.driver-records-table th:nth-child(4),
.driver-records-table td:nth-child(4) {
    min-width: 105px;
}

#result_table {
    width: max-content;
    min-width: 100%;
}

.driver-records-table th.centered,
.driver-records-table td.centered {
    text-align: center;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 7px 9px;
    background: #293443;
    color: #f4ad31;
    text-align: left;
    border-bottom: 1px solid #48566a;
}

td {
    padding: 6px 9px;
    border: 0;
    border-bottom: 1px solid #2b3543;
    cursor: pointer;
    white-space: nowrap;
}

tr:nth-child(even) td {
    background: #1b222c;
}

.load-more-row {
    margin-top: 18px;
    text-align: center;
}

.api-dashboard {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.metric-panel,
.info-section,
.code-block {
    min-width: 0;
    padding: 12px;
}

.metric-panel {
    display: grid;
    gap: 5px;
}

.metric-panel p,
.info-section p,
.code-block p {
    margin: 0;
    color: #bcc7d4;
    line-height: 1.5;
}

.status-ok {
    color: #8ee0a1;
}

.status-warn {
    color: #ffd36e;
}

.status-danger {
    color: #ff8b8b;
}

.token-row,
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.token-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.token-row code {
    min-width: 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: #111820;
    color: #e8edf2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.section-heading {
    margin-bottom: 12px;
}

.section-heading h2,
.code-block h3 {
    margin: 0;
    font-size: 16px;
}

.text-button {
    font-weight: 700;
}

.text-button.disabled {
    color: #6f7a88;
}

.endpoint-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.endpoint-list span {
    padding: 6px 8px;
    border-radius: 6px;
    background: #111820;
    color: #cbd5e1;
    font-family: Consolas, monospace;
    font-size: 12px;
}

.visible-table {
    display: table;
}

.compact-table td,
.compact-table th {
    white-space: normal;
}

.row-actions {
    cursor: default;
}

.row-copy-button {
    min-width: 48px;
    min-height: 26px;
    padding: 4px 8px;
    background: #394555;
    color: #eef3f8;
    font-size: 12px;
}

.row-copy-button:hover {
    background: #465468;
}

.code-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

pre {
    max-width: 100%;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 8px 0 0;
    padding: 9px;
    border-radius: 6px;
    background: #111820;
}

code {
    font-family: Consolas, "Courier New", monospace;
}

.notice {
    padding: 10px 12px;
    border-radius: 8px;
    background: #2b3038;
}

.notice.warn {
    border: 1px solid #f4ad31;
}

.subscription-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    align-items: start;
}

.subscription-summary {
    display: grid;
    gap: 12px;
}

.subscription-summary h2 {
    margin: 0;
    font-size: 20px;
}

.account-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #334050;
    border-radius: 6px;
    background: #111820;
}

.account-chip span {
    color: #9ca8b8;
    font-size: 12px;
    text-transform: uppercase;
}

.subscribe-form {
    display: grid;
    gap: 12px;
    justify-content: stretch;
}

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

.plan-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #202733;
    cursor: pointer;
}

.plan-card:hover,
.plan-card:has(input:checked) {
    border-color: #f4ad31;
    background: #252e3b;
}

.plan-card input {
    width: auto;
    min-height: auto;
    margin: 0;
}

.plan-card span {
    display: grid;
    gap: 3px;
}

.plan-card small {
    color: #9ca8b8;
}

.subscription-actions {
    display: flex;
    justify-content: center;
}

.investigation-buy-form {
    grid-column: 1 / -1;
}

.investigation-plan-card {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.35fr) minmax(260px, 0.75fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #202733;
}

.investigation-plan-card h2,
.investigation-plan-card p {
    margin: 0;
}

.investigation-plan-card p {
    color: #9ca8b8;
    font-size: 12px;
    line-height: 1.45;
}

.investigation-price-control {
    display: grid;
    gap: 4px;
}

.investigation-price-control label,
.investigation-price-summary span {
    color: #8f9baa;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.investigation-price-control input {
    min-height: 34px;
}

.investigation-price-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.investigation-price-summary div {
    display: grid;
    gap: 3px;
    padding: 8px;
    border-radius: 7px;
    background: #151b23;
}

.investigation-price-summary strong {
    color: #f4f7fa;
    font-size: 14px;
}

.support-panel {
    display: grid;
    gap: 12px;
    max-width: 760px;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #202733;
}

.message-list {
    display: grid;
    gap: 8px;
}

.support-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.support-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 10px;
    border-radius: 6px;
    background: #f4ad31;
    color: #171b22;
    font-weight: 700;
}

.support-link:hover {
    color: #171b22;
    background: #e89d24;
}

.support-link.secondary-button {
    color: #eef3f8;
}

.support-link.secondary-button:hover {
    color: #eef3f8;
}

.message-card {
    display: grid;
    gap: 6px;
    max-width: 78%;
    padding: 10px 12px;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #111820;
    overflow-wrap: anywhere;
}

.own-message {
    justify-self: end;
    border-color: #556478;
    background: #263140;
}

.support-message {
    justify-self: start;
}

.message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #9ca8b8;
    font-size: 12px;
}

.message-author {
    color: #f4ad31;
    font-weight: 700;
}

.message-card p {
    margin: 0;
    line-height: 1.45;
}

.support-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.auth-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(77, 96, 122, 0.22), transparent 34%),
        #0f141b;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.billing-layout {
    min-height: 100vh;
    display: grid;
    align-items: start;
    padding: 24px;
}

.billing-card {
    width: min(1180px, 100%);
    justify-self: center;
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid #334050;
    border-radius: 10px;
    background: #171d25;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.billing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.billing-logout {
    width: auto;
}

.auth-card {
    width: min(420px, 100%);
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid #334050;
    border-radius: 8px;
    background: #171d25;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.auth-brand {
    justify-self: center;
}

.auth-form {
    display: grid;
    width: 100%;
    gap: 12px;
    justify-items: stretch;
}

.auth-form input.login {
    width: 100%;
    padding: 8px 10px;
}

.auth-heading {
    display: grid;
    gap: 4px;
    text-align: center;
}

.auth-heading h1 {
    margin: 0;
    font-size: 22px;
}

.auth-divider {
    width: 100%;
    margin-bottom: 0;
}

.compact-auth-form {
    justify-items: center;
}

.compact-auth-form button {
    width: 100%;
}

@media (max-width: 920px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .nav-section {
        min-width: 0;
    }

    .content-area {
        width: 100%;
        padding: 12px;
    }

    .form-grid,
    .form-grid.compact,
    .subscription-layout,
    .plan-grid,
    .support-compose,
    .api-dashboard,
    .two-column,
    .code-grid {
        grid-template-columns: 1fr;
    }

    .search_parameter,
    .search_parameter.wide {
        grid-column: 1;
    }

    .search_parameter.small,
    .button-container {
        grid-column: 1;
    }

    .direct-identifier-grid {
        max-width: none;
    }

    .message-card {
        max-width: 100%;
    }
}

.native-select-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 31px;
    padding: 5px 28px 5px 8px;
    border: 1px solid #495668;
    border-radius: 6px;
    background: #111820;
    color: #eef3f8;
    font: inherit;
    font-size: 12px;
    text-align: left;
}

.custom-select-button::after {
    content: "";
    position: absolute;
    right: 12px;
    width: 7px;
    height: 7px;
    border-right: 2px solid #f4ad31;
    border-bottom: 2px solid #f4ad31;
    transform: rotate(45deg) translateY(-2px);
}

.custom-select.open .custom-select-button::after {
    transform: rotate(225deg) translate(-2px, -2px);
}

.custom-select-button:hover,
.custom-select.open .custom-select-button {
    border-color: #f4ad31;
}

.custom-select-button:focus-visible {
    outline: 2px solid #f4ad31;
    outline-offset: 2px;
}

.custom-select-button.placeholder {
    color: #6f7a88;
}

.custom-select-list {
    position: absolute;
    z-index: 20;
    display: none;
    width: 100%;
    max-height: 220px;
    margin-top: 4px;
    padding: 4px;
    overflow-y: auto;
    border: 1px solid #495668;
    border-radius: 6px;
    background: #151b23;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.custom-select.open .custom-select-list {
    display: grid;
    gap: 2px;
}

.custom-select-option {
    width: 100%;
    min-width: 0;
    min-height: 30px;
    padding: 6px 8px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #dbe3ec;
    font: inherit;
    font-size: 12px;
    text-align: left;
}

.custom-select-option:hover,
.custom-select-option[aria-selected="true"] {
    background: #293443;
    color: #ffffff;
}

.custom-select-option:focus-visible {
    outline: 1px solid #f4ad31;
    outline-offset: -1px;
}

@media (max-width: 700px) {
    .custom-select-list {
        max-height: 180px;
    }
}
.custom-select-list {
    scrollbar-width: thin;
    scrollbar-color: #f4ad31 #111820;
}

.custom-select-list::-webkit-scrollbar {
    width: 8px;
}

.custom-select-list::-webkit-scrollbar-track {
    border-radius: 6px;
    background: #111820;
}

.custom-select-list::-webkit-scrollbar-thumb {
    border: 2px solid #111820;
    border-radius: 6px;
    background: #f4ad31;
}

.custom-select-list::-webkit-scrollbar-thumb:hover {
    background: #ffc04d;
}
