/* ============================================================
   YasaarData Unified Theme
   Brand: Navy #001a57 | Teal #06b3b3 | Mid-blue #273272
   ============================================================ */

@keyframes spin { to { transform: rotate(360deg); } }

:root {
    --zft-primary:        #001a57;
    --zft-primary-dark:   #00174d;
    --zft-primary-mid:    #273272;
    --zft-accent:         #06b3b3;
    --zft-accent-hover:   #059898;
    --zft-bg:             #f4f6fb;
    --zft-card-bg:        #ffffff;
    --zft-border:         #d8dfe9;
    --zft-th-bg:          #eef1f8;
    --zft-th-text:        #001a57;
    --zft-link:           #001a57;
    --zft-link-hover:     #06b3b3;
    --zft-muted:          #6c7a96;
    --zft-stripe:         #f7f9fd;
    --zft-row-hover:      #eef4ff;
    --zft-success-bg:     #d4edda;
    --zft-success-text:   #155724;
    --zft-fail-bg:        #f8d7da;
    --zft-fail-text:      #721c24;
    --zft-neutral-bg:     #e9ecef;
    --zft-neutral-text:   #495057;
}

/* ---- Page background ---- */
body {
    background-color: var(--zft-bg);
}

/* ============================================================
   BREADCRUMB / PAGE HEADER
   ============================================================ */
.zft-page-header {
    padding: 12px 0 6px;
    border-bottom: 2px solid var(--zft-border);
    margin-bottom: 1.2rem;
}

.zft-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--zft-muted);
    margin-bottom: 4px;
    list-style: none;
    padding: 0;
}

.zft-breadcrumb li + li::before {
    content: '›';
    color: #bcc4d4;
    font-weight: 700;
    margin-right: 4px;
}

.zft-breadcrumb a {
    color: var(--zft-link);
    text-decoration: none;
}

.zft-breadcrumb a:hover {
    color: var(--zft-accent);
    text-decoration: underline;
}

.zft-page-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--zft-primary);
    margin: 0;
    letter-spacing: -0.3px;
}

/* ============================================================
   FILTER / SEARCH CARD
   ============================================================ */
.zft-filter-card {
    background: var(--zft-card-bg);
    border: 1px solid var(--zft-border);
    border-radius: 8px;
    margin-bottom: 1.2rem;
    box-shadow: 0 1px 4px rgba(0,26,87,.05);
}

.zft-filter-card .zft-filter-header {
    background: var(--zft-th-bg);
    border-bottom: 1px solid var(--zft-border);
    border-radius: 8px 8px 0 0;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--zft-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.zft-filter-card .zft-filter-header i {
    color: var(--zft-accent);
}

.zft-filter-card .zft-filter-body {
    padding: 14px 16px;
}

.zft-filter-card .form-control,
.zft-filter-card input[type="text"],
.zft-filter-card input[type="number"],
.zft-filter-card input[type="date"],
.zft-filter-card select {
    border: 1px solid var(--zft-border);
    border-radius: 5px;
    font-size: 12px;
    height: 32px;
    padding: 3px 8px;
    color: #333;
    background-color: #fff;
    transition: border-color .2s;
}

.zft-filter-card .form-control:focus,
.zft-filter-card input:focus,
.zft-filter-card select:focus {
    outline: none;
    border-color: var(--zft-accent);
    box-shadow: 0 0 0 2px rgba(6,179,179,.15);
}

/* ============================================================
   BUTTONS  — override Bootstrap defaults
   ============================================================ */
.btn-primary,
.btn-zft-primary {
    background-color: var(--zft-primary) !important;
    border-color: var(--zft-primary) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-zft-primary:hover {
    background-color: var(--zft-primary-dark) !important;
    border-color: var(--zft-primary-dark) !important;
}

.btn-zft-accent {
    background-color: var(--zft-accent) !important;
    border-color: var(--zft-accent) !important;
    color: #fff !important;
}

.btn-zft-accent:hover {
    background-color: var(--zft-accent-hover) !important;
}

/* Keep success green for "next/future" actions; restyle "search" to brand */
.btn-zft-search {
    background-color: var(--zft-primary);
    border-color: var(--zft-primary);
    color: #fff;
    font-size: 12px;
    padding: 4px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background .2s;
}

.btn-zft-search:hover {
    background-color: var(--zft-accent);
    border-color: var(--zft-accent);
    color: #fff;
}

/* ============================================================
   CONTENT SECTION CARD
   ============================================================ */
.zft-section-card {
    background: var(--zft-card-bg);
    border: 1px solid var(--zft-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 6px rgba(0,26,87,.06);
}

.zft-section-card .zft-section-header {
    background: var(--zft-primary);
    color: #fff;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zft-section-card .zft-section-header .badge {
    background: rgba(255,255,255,.2);
    border-radius: 20px;
    font-size: 11px;
    padding: 2px 10px;
}

/* ============================================================
   TABLES  — global overrides
   ============================================================ */
.table {
    border-spacing: 0 !important;
    border-collapse: collapse !important;
    border: none !important;
    width: 100%;
    font-family: 'Inter Var', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.table td,
.table th {
    padding: 6px 10px !important;
    font-size: 12px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid var(--zft-border) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

.table thead th {
    background: var(--zft-th-bg) !important;
    color: var(--zft-th-text) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid var(--zft-border) !important;
    position: sticky;
    top: 0;
    z-index: 2;
}

.table tbody tr:nth-child(even) {
    background-color: var(--zft-stripe) !important;
}

.table tbody tr:nth-child(odd) {
    background-color: var(--zft-card-bg) !important;
}

.table tbody tr:hover {
    background-color: var(--zft-row-hover) !important;
    transition: background-color .15s;
}

/* Table links — brand color */
.table a,
.table td a {
    color: var(--zft-link) !important;
    font-weight: 600 !important;
    text-decoration: none;
}

.table a:hover,
.table td a:hover {
    color: var(--zft-accent) !important;
    text-decoration: underline;
}

/* Ticker / symbol badge in tables */
.zft-ticker {
    display: inline-block;
    background: var(--zft-th-bg);
    color: var(--zft-primary);
    border: 1px solid var(--zft-border);
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Status badges */
.zft-badge-pass {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: var(--zft-success-bg);
    color: var(--zft-success-text);
    border: 1px solid #c3e6cb;
    cursor: pointer;
    text-decoration: none;
}

.zft-badge-fail {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: var(--zft-fail-bg);
    color: var(--zft-fail-text);
    border: 1px solid #f5c6cb;
    cursor: pointer;
    text-decoration: none;
}

.zft-badge-neutral {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: var(--zft-neutral-bg);
    color: var(--zft-neutral-text);
    border: 1px solid #ced4da;
    cursor: pointer;
    text-decoration: none;
}

.zft-badge-pass:hover   { background: #c3e6cb; text-decoration: none; color: var(--zft-success-text); }
.zft-badge-fail:hover   { background: #f5c6cb; text-decoration: none; color: var(--zft-fail-text); }
.zft-badge-neutral:hover { background: #ced4da; text-decoration: none; color: var(--zft-neutral-text); }

/* ============================================================
   DATATABLE OVERRIDES
   ============================================================ */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--zft-border);
    border-radius: 5px;
    padding: 3px 8px;
    font-size: 12px;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--zft-border);
    border-radius: 5px;
    padding: 2px 4px;
    font-size: 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--zft-primary) !important;
    color: #fff !important;
    border: 1px solid var(--zft-primary) !important;
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--zft-th-bg) !important;
    color: var(--zft-primary) !important;
    border: 1px solid var(--zft-border) !important;
    border-radius: 4px;
}

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    background-color: var(--zft-th-bg) !important;
    color: var(--zft-th-text) !important;
}

/* DataTable filter row inputs */
table.dataTable thead .filters th input.form-control {
    font-size: 11px;
    height: 26px;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--zft-border);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

/* dt-buttons (column visibility etc) */
.dt-button {
    background: var(--zft-th-bg) !important;
    border: 1px solid var(--zft-border) !important;
    color: var(--zft-primary) !important;
    border-radius: 5px !important;
    font-size: 12px !important;
    padding: 4px 12px !important;
}

.dt-button:hover {
    background: var(--zft-primary) !important;
    color: #fff !important;
}

/* ============================================================
   SECTION TITLES  (h2 inline in pages like IPOs)
   ============================================================ */
.zft-sub-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--zft-primary);
    padding: 10px 0 4px;
    border-left: 3px solid var(--zft-accent);
    padding-left: 10px;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
}

/* ============================================================
   RESPONSIVE TABLE WRAPPER
   ============================================================ */
.zft-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
}

/* ============================================================
   LEGEND / DISCLAIMER FOOTER
   ============================================================ */
.zft-legend {
    font-size: 11px;
    color: var(--zft-muted);
    margin-top: 6px;
    margin-bottom: 1.5rem;
    padding: 8px 12px;
    background: var(--zft-th-bg);
    border: 1px solid var(--zft-border);
    border-radius: 6px;
}

.zft-disclaimer {
    font-size: 11px;
    color: var(--zft-muted);
    padding: 8px 12px;
    background: #fff8e1;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    margin-bottom: 2rem;
}

/* ============================================================
   FORM FIELDSETS (insider screener etc.)
   ============================================================ */
.form-section {
    border: none;
    border-bottom: 1px solid var(--zft-border);
    margin-bottom: 1.5rem;
    padding-bottom: 1.2rem;
}

.form-section legend {
    font-size: 13px;
    font-weight: 700;
    color: var(--zft-primary);
    padding: 0 6px;
    width: auto;
    border-bottom: none;
    margin-bottom: .6rem;
}

.noUi-target {
    background: var(--zft-border) !important;
    border-radius: 3px !important;
    height: 6px !important;
    border: none !important;
    box-shadow: none !important;
}

.noUi-connect {
    background: var(--zft-accent) !important;
}

.noUi-handle {
    background: var(--zft-primary) !important;
    border: none !important;
    box-shadow: 0 1px 4px rgba(0,26,87,.3) !important;
    border-radius: 50% !important;
    width: 16px !important;
    height: 16px !important;
    cursor: pointer;
}

/* ============================================================
   MISC
   ============================================================ */
.text-zft-primary { color: var(--zft-primary) !important; }
.text-zft-accent  { color: var(--zft-accent) !important; }
.bg-zft-primary   { background-color: var(--zft-primary) !important; color: #fff; }
.bg-zft-th        { background-color: var(--zft-th-bg) !important; }

/* Back-to-top quick fade */
.zft-back-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 38px;
    height: 38px;
    background: var(--zft-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,26,87,.3);
}

.zft-back-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.zft-back-top:hover {
    background: var(--zft-accent);
}

/* ============================================================
   COMPANY SIDEBAR
   ============================================================ */
.sidebar {
    margin: 0;
    padding: 0;
    width: 200px;
    background-color: #f1f1f1;
    height: 100%;
    overflow: auto;
    float: left;
}

.sidebar a {
    display: block;
    color: black;
    padding: 16px;
    text-decoration: none;
    font-size: 13px;
}

.sidebar a.active {
    background-color: #001a57;
    color: white !important;
}

.sidebar a:hover:not(.active) {
    background-color: #555;
    color: white !important;
    text-decoration: none;
}

div.content {
    margin-left: 200px;
    padding: 1px 16px;
    height: auto;
}

@media screen and (max-width: 700px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .sidebar a {
        float: left;
    }
    div.content {
        margin-left: 0;
    }
}

@media screen and (max-width: 400px) {
    .sidebar a {
        text-align: center;
        float: none;
    }
}

.bg-color {
    background-color: #001a57;
}

/* ============================================================
   ENHANCED DESIGN v2
   ============================================================ */

/* ---- Typography & Global smoothing ---- */
body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 13px;
    color: #1a2235;
}

html { scroll-behavior: smooth; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f0f2f7; }
::-webkit-scrollbar-thumb { background: var(--zft-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--zft-primary-mid); }

/* ---- NAVBAR ---- */
nav.navbar {
    border-bottom: 1px solid #e4e9f4 !important;
    box-shadow: 0 2px 10px rgba(0,26,87,.08) !important;
    background: #ffffff !important;
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0 28px !important;
}

nav.navbar .nav-item > a.nav-link {
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: #2a3555 !important;
    padding: 14px 10px !important;
    position: relative;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}

nav.navbar .nav-item.active > a.nav-link,
nav.navbar .nav-item > a.nav-link:hover {
    color: var(--zft-primary) !important;
    border-bottom-color: var(--zft-accent);
}

nav.navbar .dropdown-menu {
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 36px rgba(0,26,87,.15) !important;
    padding: 6px 0 !important;
    margin-top: 2px !important;
    min-width: 210px;
    animation: dropFadeIn .15s ease;
}

@keyframes dropFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

nav.navbar .dropdown-item {
    font-size: 12.5px;
    padding: 7px 18px;
    color: #2a3555;
    transition: background .12s, color .12s, padding-left .12s;
}

nav.navbar .dropdown-item:hover {
    background: #f0f4ff !important;
    color: var(--zft-primary) !important;
    padding-left: 24px;
}

nav.navbar .dropdown-item.disabled {
    color: #c2cad8 !important;
    cursor: default;
}

nav.navbar .dropdown-header {
    font-size: 10px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--zft-accent) !important;
    padding: 10px 18px 4px;
}

/* ---- PAGE HEADER ---- */
.zft-page-header {
    border-bottom: none !important;
    padding-bottom: 14px !important;
    margin-bottom: 1.5rem !important;
    position: relative;
}

.zft-page-header::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 44px;
    height: 3px;
    background: linear-gradient(90deg, var(--zft-accent) 0%, var(--zft-primary) 100%);
    border-radius: 3px;
}

.zft-breadcrumb li:last-child {
    color: var(--zft-primary);
    font-weight: 500;
}

/* ---- FILTER CARD ---- */
.zft-filter-card {
    border-left: 3px solid var(--zft-accent) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 10px rgba(0,26,87,.07) !important;
}

.zft-filter-card .zft-filter-header {
    background: linear-gradient(90deg, #eef2ff 0%, var(--zft-th-bg) 100%) !important;
    border-radius: 7px 9px 0 0 !important;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-size: 11px !important;
}

.zft-filter-card .form-control:focus,
.zft-filter-card input:focus,
.zft-filter-card select:focus {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(6,179,179,.18) !important;
}

/* ---- SECTION CARD ---- */
.zft-section-card {
    border-radius: 10px !important;
    box-shadow: 0 2px 12px rgba(0,26,87,.07) !important;
    transition: box-shadow .2s;
}

.zft-section-card:hover {
    box-shadow: 0 4px 22px rgba(0,26,87,.11) !important;
}

.zft-section-card .zft-section-header {
    background: linear-gradient(90deg, var(--zft-primary) 0%, #1e3c72 100%) !important;
    padding: 11px 16px !important;
    font-size: 12.5px !important;
    letter-spacing: .2px;
}

/* ---- TABLES ---- */
.table tbody tr { transition: background-color .1s !important; }
.table td { font-size: 12.5px !important; }

.table thead th {
    background: linear-gradient(180deg, #f7f9fd 0%, var(--zft-th-bg) 100%) !important;
}

/* ---- CARD GLOBAL ---- */
.card {
    border-radius: 10px !important;
    border: 1px solid var(--zft-border) !important;
    box-shadow: 0 2px 8px rgba(0,26,87,.05) !important;
}

.card-header {
    background: var(--zft-th-bg) !important;
    border-bottom: 1px solid var(--zft-border) !important;
    border-radius: 9px 9px 0 0 !important;
    font-weight: 600;
    font-size: 13px;
    color: var(--zft-primary);
    padding: 10px 16px !important;
}

/* ---- BUTTONS ---- */
.btn { border-radius: 6px !important; transition: all .16s !important; }

.btn-outline-secondary {
    border-color: var(--zft-border) !important;
    color: #2a3555 !important;
}
.btn-outline-secondary:hover {
    background: #f0f4ff !important;
    border-color: var(--zft-primary-mid) !important;
    color: var(--zft-primary) !important;
}

/* ---- ALERTS ---- */
.alert { border-radius: 8px !important; font-size: 13px; }

/* ============================================================
   DASHBOARD STAT CARDS
   ============================================================ */
.zft-stat-card {
    background: #fff;
    border: 1px solid var(--zft-border);
    border-radius: 12px;
    padding: 20px 22px 16px;
    box-shadow: 0 2px 10px rgba(0,26,87,.06);
    transition: box-shadow .2s, transform .2s;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.zft-stat-card:hover {
    box-shadow: 0 8px 24px rgba(0,26,87,.13);
    transform: translateY(-2px);
}

.zft-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    border-radius: 12px 0 0 12px;
}

.zft-stat-card.accent-primary::before { background: linear-gradient(180deg, var(--zft-primary), var(--zft-primary-mid)); }
.zft-stat-card.accent-success::before { background: linear-gradient(180deg, #28a745, #20c868); }
.zft-stat-card.accent-warning::before { background: linear-gradient(180deg, #f0a500, #ffd000); }
.zft-stat-card.accent-info::before    { background: linear-gradient(180deg, #17a2b8, #1bc8e0); }

.zft-stat-icon {
    width: 46px; height: 46px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.zft-stat-icon.primary { background: #e8edf8; color: var(--zft-primary); }
.zft-stat-icon.success { background: #d4f4e2; color: #1e9e43; }
.zft-stat-icon.warning { background: #fff3cc; color: #c07d00; }
.zft-stat-icon.info    { background: #d0f0f8; color: #0e88a0; }

.zft-stat-label {
    font-size: 10.5px;
    color: var(--zft-muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 600;
    margin-bottom: 3px;
}

.zft-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--zft-primary);
    line-height: 1.15;
    font-family: 'Inter', sans-serif;
}

.zft-stat-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #f0f2f7;
    font-size: 11px;
    color: var(--zft-accent);
    font-weight: 500;
}

.zft-stat-footer:hover { color: var(--zft-primary); text-decoration: none; }

/* ============================================================
   QUICK LINK CARDS
   ============================================================ */
.zft-quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--zft-border);
    border-radius: 10px;
    padding: 13px 15px;
    box-shadow: 0 1px 6px rgba(0,26,87,.04);
    transition: all .18s;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.zft-quick-link::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    height: 2px; width: 100%;
    background: linear-gradient(90deg, var(--zft-primary), var(--zft-accent));
    opacity: 0;
    transition: opacity .18s;
}

.zft-quick-link:hover {
    box-shadow: 0 5px 18px rgba(0,26,87,.12);
    transform: translateY(-2px);
    border-color: #bfcaeb;
    text-decoration: none !important;
}

.zft-quick-link:hover::after { opacity: 1; }

.zft-quick-link-icon {
    width: 38px; height: 38px;
    border-radius: 9px;
    background: #eef1f8;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    color: var(--zft-primary);
    flex-shrink: 0;
    transition: background .18s, color .18s;
}

.zft-quick-link:hover .zft-quick-link-icon {
    background: var(--zft-primary);
    color: #fff;
}

.zft-quick-link-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #1a2235;
    margin-bottom: 2px;
    display: block;
}

.zft-quick-link-desc {
    font-size: 11px;
    color: var(--zft-muted);
    line-height: 1.4;
    display: block;
}

/* ============================================================
   LIVE INDICATOR
   ============================================================ */
.zft-live-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #5de27a;
    letter-spacing: .2px;
}

.zft-live-dot::before {
    content: '';
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #28a745;
    box-shadow: 0 0 0 0 rgba(40,167,69,.5);
    animation: livePulse 1.6s ease-in-out infinite;
}

@keyframes livePulse {
    0%   { box-shadow: 0 0 0 0 rgba(40,167,69,.6); }
    70%  { box-shadow: 0 0 0 7px rgba(40,167,69,.0); }
    100% { box-shadow: 0 0 0 0 rgba(40,167,69,.0); }
}

/* ============================================================
   FORM TYPE BADGES
   ============================================================ */
.badge-form {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .2px;
    text-transform: uppercase;
    font-family: 'SFMono-Regular', Consolas, monospace;
    white-space: nowrap;
}

.badge-form-10k  { background: #d4edda; color: #145a26; }
.badge-form-10q  { background: #cce5ff; color: #003f8c; }
.badge-form-8k   { background: #fff3cd; color: #7a5800; }
.badge-form-def  { background: #e2d9f3; color: #4a235a; }
.badge-form-s    { background: #fde8d8; color: #7b2d00; }
.badge-form-sc   { background: #d6eaf8; color: #1a5276; }
.badge-form-other { background: #e9ecef; color: #495057; }

/* ============================================================
   SIDEBAR ENHANCED
   ============================================================ */
.sidebar {
    width: 220px !important;
    background: #fff !important;
    border-right: 1px solid var(--zft-border) !important;
    box-shadow: 2px 0 8px rgba(0,26,87,.04) !important;
    float: left;
    min-height: 500px;
    overflow: visible !important;
}

.sidebar a {
    display: flex !important;
    align-items: center !important;
    padding: 9px 14px !important;
    font-size: 12.5px !important;
    color: #2a3555 !important;
    border-left: 3px solid transparent !important;
    border-bottom: 1px solid #f4f6fb !important;
    transition: all .14s !important;
    text-decoration: none !important;
}

.sidebar a i {
    width: 17px;
    margin-right: 8px;
    font-size: 11.5px;
    color: var(--zft-muted);
    text-align: center;
    flex-shrink: 0;
    transition: color .14s;
}

.sidebar a.active {
    background: #eef1f8 !important;
    border-left-color: var(--zft-primary) !important;
    color: var(--zft-primary) !important;
    font-weight: 600 !important;
}

.sidebar a.active i { color: var(--zft-primary); }

.sidebar a:hover:not(.active):not(.disabled-link) {
    background: #f5f7fd !important;
    border-left-color: var(--zft-accent) !important;
    color: var(--zft-primary) !important;
}

.sidebar a:hover:not(.active):not(.disabled-link) i { color: var(--zft-accent); }

.sidebar a.disabled-link {
    color: #c2cad8 !important;
    cursor: default;
    background: transparent !important;
}

.sidebar a.disabled-link i { color: #dde2ec; }

.sidebar-section {
    display: block;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--zft-muted);
    padding: 9px 14px 4px;
    background: #f8f9fc;
    border-top: 1px solid var(--zft-border);
    border-bottom: 1px solid var(--zft-border);
}

div.content {
    margin-left: 220px !important;
    padding: 8px 20px !important;
}

/* ============================================================
   SECTION STRIP LABEL
   ============================================================ */
.zft-section-strip {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--zft-muted);
    margin: 1.6rem 0 .8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.zft-section-strip::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--zft-border);
}

/* ============================================================
   COMPANY HEADER BAR
   ============================================================ */
.zft-company-header {
    background: linear-gradient(90deg, var(--zft-primary) 0%, #1a3a6e 100%);
    color: #fff;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 1.2rem;
}

.zft-company-header h2 {
    color: #fff !important;
    font-size: 1.15rem;
    margin: 0;
    font-weight: 700;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.zft-back-top {
    box-shadow: 0 4px 14px rgba(0,26,87,.25) !important;
    transition: background .2s, box-shadow .2s, transform .2s !important;
}

.zft-back-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,26,87,.35) !important;
}

/* ============================================================
   FONT UTILITY
   ============================================================ */
.font-monospace {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
    font-size: 11.5px;
}

/* ============================================================
   HEADER SEARCH / AUTOCOMPLETE
   ============================================================ */

/* Outer flex row: [input-area] [Search btn] */
.ac-hdr-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 420px;
}

/* Relative container that holds input + dropdown */
.ac-wrapper {
    position: relative;
    flex: 1;
}

/* Input row */
.ac-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, .11);
    border: 1.5px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    padding: 0 12px;
    height: 40px;
    transition: background .2s, border-color .2s, box-shadow .2s;
}

.ac-input-wrap:focus-within {
    background: rgba(255, 255, 255, .18);
    border-color: var(--zft-accent);
    box-shadow: 0 0 0 3px rgba(6, 179, 179, .25);
}

.ac-search-icon {
    color: rgba(255, 255, 255, .55);
    font-size: 13px;
    flex-shrink: 0;
    margin-right: 9px;
    pointer-events: none;
}

.ac-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    caret-color: var(--zft-accent);
    min-width: 0;
    letter-spacing: .1px;
}

.ac-input::placeholder {
    color: rgba(255, 255, 255, .38);
    font-weight: 400;
}

.ac-clear-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, .45);
    font-size: 11px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    transition: color .15s;
}

.ac-clear-btn:hover {
    color: rgba(255, 255, 255, .9);
}

/* Submit button */
.ac-hdr-btn {
    background: var(--zft-accent);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 0 18px;
    height: 40px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
    transition: background .17s, transform .12s, box-shadow .17s;
    box-shadow: 0 2px 8px rgba(6, 179, 179, .35);
    letter-spacing: .2px;
}

.ac-hdr-btn:hover {
    background: var(--zft-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(6, 179, 179, .45);
}

/* ---- Dropdown ---- */
.ac-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(0, 26, 87, .08);
    animation: acDropIn .14s ease;
}

@keyframes acDropIn {
    from { opacity: 0; transform: translateY(-5px) scale(.99); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ac-dropdown::-webkit-scrollbar { width: 4px; }
.ac-dropdown::-webkit-scrollbar-track { background: transparent; }
.ac-dropdown::-webkit-scrollbar-thumb { background: var(--zft-border); border-radius: 2px; }

/* Loading row */
.ac-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    gap: 10px;
    color: var(--zft-muted);
    font-size: 12px;
}

.ac-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--zft-border);
    border-top-color: var(--zft-primary);
    border-radius: 50%;
    animation: acSpin .65s linear infinite;
}

@keyframes acSpin { to { transform: rotate(360deg); } }

/* No results */
.ac-no-results {
    padding: 22px;
    text-align: center;
    color: var(--zft-muted);
    font-size: 12.5px;
}

/* ---- Each result item ---- */
.ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f2f4f9;
    transition: background .1s;
}

.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: #f4f7ff; }

/* Initials avatar */
.ac-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--zft-primary) 0%, #1e3c72 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: .5px;
    font-family: 'Inter', sans-serif;
    user-select: none;
}

.ac-item-body { flex: 1; min-width: 0; }

.ac-item-row1 {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
}

.ac-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a2235;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.ac-item-ticker {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--zft-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-family: 'SFMono-Regular', Consolas, monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

.ac-item-cik {
    font-size: 10.5px;
    color: var(--zft-muted);
    font-family: 'SFMono-Regular', Consolas, monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

.ac-item-row2 {
    font-size: 11px;
    color: var(--zft-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .ac-hdr-wrap { width: 280px; }
}

@media (max-width: 768px) {
    .zft-stat-card { margin-bottom: 12px; }
    nav.navbar { position: relative; }
    div.content { margin-left: 0 !important; }
    .sidebar { float: none; width: 100% !important; min-height: auto; }
    .ac-hdr-wrap { width: 100%; }
    .top-head-inner { flex-wrap: wrap; gap: 12px; }
}
