/* styles.css - Modernized Yieldier Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================================================
   TOP BAR
   ============================================================================ */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 24px;
    z-index: 1001;
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
}

.top-bar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.top-bar-logo:hover {
    opacity: 0.8;
}

.top-bar-logo img {
    height: 32px;
    width: auto;
}

/* Global Search Bar */
.global-search-container {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.global-search-input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    font-size: 15px;
    border: 2px solid rgba(0, 102, 204, 0.15);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    font-family: inherit;
}

.global-search-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.global-search-input::placeholder {
    color: #999;
}

.global-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    width: 26px;
    height: 26px;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-weight: 600;
    display: none;
}

.global-search-clear:hover {
    background: rgba(0, 102, 204, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.global-search-clear.visible {
    display: block;
}

.global-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(0, 102, 204, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    z-index: 2000;
}

.global-search-dropdown.active {
    display: block;
}

.search-dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 102, 204, 0.08);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.search-dropdown-item:first-child {
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
}

.search-dropdown-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 11px;
    border-bottom-right-radius: 11px;
}

.search-dropdown-loading:first-child,
.search-dropdown-empty:first-child {
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
    border-bottom-left-radius: 11px;
    border-bottom-right-radius: 11px;
}

.search-dropdown-item:hover,
.search-dropdown-item.selected {
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.06) 0%, rgba(0, 102, 204, 0.03) 100%);
}

.search-item-main {
    flex: 1;
    min-width: 0;
}

.search-item-description {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.search-item-identifier {
    font-size: 13px;
    color: #718096;
}

.search-item-type {
    font-size: 12px;
    font-weight: 600;
    color: #0066cc;
    background: rgba(0, 102, 204, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.search-dropdown-loading {
    padding: 16px;
    text-align: center;
    color: #718096;
    font-size: 14px;
}

.search-dropdown-empty {
    padding: 16px;
    text-align: center;
    color: #718096;
    font-size: 14px;
}

.search-show-more {
    padding: 12px 16px;
    text-align: center;
    color: #0066cc;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-top: 1px solid rgba(0, 102, 204, 0.1);
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
    background: rgba(0, 102, 204, 0.03);
    transition: all 0.2s ease;
}

.search-show-more:hover {
    background: rgba(0, 102, 204, 0.08);
    color: #0052a3;
}

.search-show-more:active {
    background: rgba(0, 102, 204, 0.12);
}

.search-show-more.selected {
    background: rgba(0, 102, 204, 0.12);
    color: #0052a3;
}

/* Hide result count header on desktop (only show on mobile) */
.search-results-header {
    display: none;
}

/* ============================================================================
   SIDE NAVIGATION
   ============================================================================ */
.sidenav {
    width: 260px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.06);
    position: fixed;
    height: calc(100vh - 60px);
    top: 60px;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidenav.collapsed {
    width: 70px;
}

/* Collapse Button */
.collapse-btn {
    position: absolute;
    right: -15px;
    top: 20px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    border: 1px solid rgba(0, 102, 204, 0.15);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    z-index: 10;
}

.collapse-btn:hover {
    background: linear-gradient(135deg, #f0f4f8 0%, #e1e8f0 100%);
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.collapse-btn svg {
    width: 16px;
    height: 16px;
    stroke: #0066cc;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidenav.collapsed .collapse-btn svg {
    transform: rotate(180deg);
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: linear-gradient(90deg, #0066cc 0%, #0052a3 100%);
    margin: 4px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.sidenav-menu {
    flex: 1;
    padding: 24px 0;
    overflow-y: auto;
}

.sidenav-menu ul {
    list-style: none;
}

.sidenav-menu li {
    margin: 4px 0;
}

.sidenav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.sidenav.collapsed .sidenav-link {
    padding: 14px;
    justify-content: center;
    gap: 0;
}

.sidenav-link svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    flex-shrink: 0;
    stroke: #4a5568;
    transition: all 0.2s ease;
}

.sidenav-link span {
    transition: opacity 0.3s ease;
}

.sidenav.collapsed .sidenav-link span {
    opacity: 0;
    width: 0;
}

.sidenav-link:hover {
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.08) 0%, rgba(0, 102, 204, 0.04) 100%);
    color: #0066cc;
    border-left-color: #0066cc;
}

.sidenav-link:hover svg {
    stroke: #0066cc;
    transform: scale(1.1);
}

.sidenav-link.active {
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.12) 0%, rgba(0, 102, 204, 0.06) 100%);
    color: #0066cc;
    border-left-color: #0066cc;
    font-weight: 600;
}

.sidenav-link.active svg {
    stroke: #0066cc;
}

/* ============================================================================
   MAIN CONTENT AREA
   ============================================================================ */
.main-content {
    margin-left: 260px;
    margin-top: 60px;
    flex: 1;
    padding: 40px;
    width: calc(100% - 260px);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidenav.collapsed ~ .main-content {
    margin-left: 70px;
    width: calc(100% - 70px);
}

/* ============================================================================
   LANDING PAGE STYLES
   ============================================================================ */
.landing-container {
    max-width: 900px;
    margin: 80px auto;
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.landing-logo {
    margin-bottom: 48px;
}

.landing-logo img {
    width: 320px;
    height: auto;
    filter: drop-shadow(0 4px 16px rgba(0, 102, 204, 0.1));
}

.landing-container h1 {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 52px;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.landing-container p {
    color: #4a5568;
    font-size: 20px;
    line-height: 1.7;
    margin-bottom: 40px;
}

.landing-cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto;
}

.landing-cta {
    flex: 1 1 240px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.3);
    text-align: center;
}

.landing-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.4);
}

.landing-cta:active {
    transform: translateY(0);
}

/* ============================================================================
   PAGE ELEMENTS
   ============================================================================ */
h1 {
    color: #1a202c;
    margin-bottom: 32px;
    font-weight: 700;
    font-size: 32px;
    letter-spacing: -0.5px;
}

/* Search Container */
.search-container {
    margin-bottom: 24px;
    max-width: 600px;
}

.search-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 450px;
}

.search-box {
    width: 100%;
    padding: 14px 18px;
    padding-right: 40px;
    font-size: 15px;
    border: 2px solid rgba(0, 102, 204, 0.1);
    border-radius: 12px;
    box-sizing: border-box;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    font-family: inherit;
}

.search-box:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.15);
}

.clear-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    width: 26px;
    height: 26px;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-weight: 600;
}

.clear-button:hover {
    background: rgba(0, 102, 204, 0.2);
    transform: translateY(-50%) scale(1.1);
}

/* ============================================================================
   AG GRID STYLES
   ============================================================================ */
#myGrid {
    height: calc(100vh - 240px);
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 102, 204, 0.1);
}

.cursor-pointer {
    cursor: pointer;
}

.ag-row.cursor-pointer:hover {
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.04) 0%, rgba(0, 102, 204, 0.02) 100%);
}

/* ============================================================================
   ABOUT PAGE STYLES
   ============================================================================ */
.about-container {
    max-width: 1000px;
    margin: 0 auto;
}

.about-container h1 {
    color: #1a202c;
    font-size: 42px;
    margin-bottom: 32px;
    font-weight: 700;
}

.about-section {
    background: #ffffff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 32px;
    border: 1px solid rgba(0, 102, 204, 0.08);
}

.mission-section {
    background: linear-gradient(135deg, #e6f2ff 0%, #d9e9f7 100%);
    border-left: 4px solid #0066cc;
}

.mission-statement {
    font-size: 24px;
    line-height: 1.6;
    color: #1a202c;
    font-weight: 500;
    margin: 0;
    text-align: center;
}

.legal-section h2 {
    color: #1a202c;
    font-size: 28px;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(0, 102, 204, 0.1);
    font-weight: 700;
}

.legal-section h3 {
    color: #0066cc;
    font-size: 20px;
    margin: 28px 0 16px 0;
    font-weight: 600;
}

.legal-section p {
    color: #4a5568;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.legal-section ul {
    margin: 16px 0 16px 28px;
    color: #4a5568;
    font-size: 15px;
    line-height: 1.8;
}

.legal-section li {
    margin-bottom: 10px;
}

.effective-date {
    font-style: italic;
    color: #718096;
    font-size: 14px;
    margin-bottom: 20px;
}

.disclaimer-emphasis {
    font-weight: 600;
    color: #1a202c;
    background: linear-gradient(135deg, #fff9e6 0%, #ffedb3 100%);
    padding: 16px 20px;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
}

/* ============================================================================
   PAGE HEADER STYLES
   ============================================================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.page-header .search-wrapper {
    max-width: 400px;
    min-width: 250px;
}

.page-header h1 {
    margin: 0;
}

.page-header .clear-button {
    display: none;
}

.filter-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    border: 2px solid rgba(0, 102, 204, 0.2);
    border-radius: 12px;
    color: #0066cc;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filter-btn:hover {
    background: linear-gradient(135deg, #f0f4f8 0%, #e1e8f0 100%);
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    border-color: #0066cc;
}

.filter-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================================================
   FILTER PANEL SIDEBAR
   ============================================================================ */
.filter-panel {
    position: fixed;
    right: 0;
    top: 60px;
    height: calc(100vh - 60px);
    width: 360px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(0, 102, 204, 0.1);
}

.filter-panel.active {
    transform: translateX(0);
}

.main-content.filter-active {
    width: calc(100% - 260px - 360px);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidenav.collapsed ~ .main-content.filter-active {
    width: calc(100% - 70px - 360px);
}

.filter-panel-header {
    padding: 24px;
    border-bottom: 2px solid rgba(0, 102, 204, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-panel-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1a202c;
    font-weight: 700;
}

.filter-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #4a5568;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.filter-close-btn:hover {
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
}

.filter-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.filter-group {
    margin-bottom: 28px;
}

.filter-group-label {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: block;
}

.filter-range {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-range input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid rgba(0, 102, 204, 0.1);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.filter-range input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.filter-range-separator {
    color: #718096;
    font-weight: 600;
}

/* Range Slider Styles */
.range-slider-container {
    padding: 20px 10px;
}

.range-slider-wrapper {
    position: relative;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin: 30px 0 20px 0;
}

.range-slider-track {
    position: absolute;
    height: 100%;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-radius: 3px;
}

.range-slider-input {
    position: absolute;
    width: 100%;
    height: 6px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.range-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #0066cc;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
    transition: all 0.2s ease;
}

.range-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(0, 102, 204, 0.4);
}

.range-slider-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #0066cc;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
    transition: all 0.2s ease;
}

.range-slider-input::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(0, 102, 204, 0.4);
}

.range-slider-input:focus {
    outline: none;
}

.range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

.range-value {
    padding: 8px 14px;
    background: #f7fafc;
    border: 2px solid rgba(0, 102, 204, 0.1);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
    min-width: 70px;
    text-align: center;
}

.filter-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.filter-checkbox:hover {
    background: rgba(0, 102, 204, 0.05);
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0066cc;
}

.filter-checkbox label {
    cursor: pointer;
    font-size: 15px;
    color: #1a202c;
    user-select: none;
}

.filter-radio-group {
    display: flex;
    gap: 12px;
}

.filter-radio {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(0, 102, 204, 0.1);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #4a5568;
}

.filter-radio:hover {
    border-color: #0066cc;
    background: rgba(0, 102, 204, 0.05);
}

.filter-radio.active {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    border-color: #0066cc;
}

.filter-panel-footer {
    padding: 20px 24px;
    border-top: 2px solid rgba(0, 102, 204, 0.1);
    display: flex;
    gap: 12px;
}

.filter-apply-btn,
.filter-clear-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-apply-btn {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.filter-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

.filter-clear-btn {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid rgba(0, 102, 204, 0.1);
}

.filter-clear-btn:hover {
    background: #edf2f7;
    border-color: #0066cc;
    color: #0066cc;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .collapse-btn {
        display: none;
    }

    .sidenav {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }

    .sidenav.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 24px 20px;
        margin-top: 60px;
    }

    .filter-panel {
        width: 100%;
        right: 0;
        transform: translateX(100%);
    }

    .filter-panel.active {
        transform: translateX(0);
    }

    .main-content.filter-active {
        width: 100%;
    }

    .top-bar {
        padding: 0 16px;
        gap: 12px;
    }

    .global-search-container {
        max-width: none;
    }

    .global-search-input {
        font-size: 14px;
        padding: 8px 36px 8px 12px;
    }

    /* Mobile search dropdown improvements */
    .global-search-dropdown {
        max-height: 60vh;
        left: 0;
        right: 0;
        width: 100%;
    }

    .search-dropdown-item {
        padding: 16px;
    }

    .search-item-description {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .search-item-identifier {
        font-size: 12px;
    }

    .search-item-type {
        font-size: 11px;
        padding: 5px 10px;
    }

    .search-dropdown-loading,
    .search-dropdown-empty {
        padding: 32px 20px;
        font-size: 15px;
    }

    .search-show-more {
        padding: 14px 16px;
        font-size: 13px;
    }

    .landing-container {
        margin: 40px 20px;
        padding: 40px 24px;
    }

    .landing-container h1 {
        font-size: 36px;
    }

    .landing-logo img {
        width: 220px;
    }

    .about-container h1 {
        font-size: 32px;
    }

    .mission-statement {
        font-size: 20px;
    }

    .legal-section h2 {
        font-size: 24px;
    }

    .legal-section h3 {
        font-size: 18px;
    }

    #myGrid {
        height: calc(100vh - 200px);
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        height: 56px;
        padding: 0 12px;
    }

    .top-bar-logo img {
        height: 28px;
    }

    .sidenav {
        height: calc(100vh - 56px);
        top: 56px;
    }

    .main-content {
        margin-top: 56px;
    }

    .landing-container h1 {
        font-size: 28px;
    }

    .landing-container p {
        font-size: 16px;
    }

    .landing-logo img {
        width: 180px;
    }

    .about-container h1 {
        font-size: 28px;
    }

    .mission-statement {
        font-size: 18px;
    }

    .about-section {
        padding: 24px;
    }

    .legal-section h2 {
        font-size: 22px;
    }

    .legal-section h3 {
        font-size: 17px;
    }

    .legal-section p,
    .legal-section ul {
        font-size: 14px;
    }
}

/* ============================================================================
   SECURITY COUNTER
   ============================================================================ */
.main-content {
    position: relative;
}

.security-counter {
    position: absolute;
    bottom: 15px;
    left: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid rgba(0, 102, 204, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #1a202c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.security-counter span {
    color: #0066cc;
}

@media (max-width: 768px) {
    .security-counter {
        left: 10px;
        bottom: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ============================================================================
   CSS VARIABLES
   ============================================================================ */
:root {
    --surface-light: #ffffff;
    --surface: #f8f9fa;
    --surface-hover: rgba(0, 102, 204, 0.05);
    --border-color: rgba(0, 102, 204, 0.1);
    --primary-color: #0066cc;
    --text-secondary: #718096;
}

/* ============================================================================
   SECTOR MULTI-SELECT (for preferreds.html and bonds.html)
   ============================================================================ */
.sector-multi-select {
    position: relative;
    width: 100%;
}

.sector-select-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.sector-select-header:hover {
    background: var(--surface-hover);
}

.sector-select-header svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.sector-multi-select.open .sector-select-header svg {
    transform: rotate(180deg);
}

.sector-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow: hidden;
    display: none;
    z-index: 1000;
    flex-direction: column;
}

.sector-multi-select.open .sector-dropdown {
    display: flex;
}

.sector-dropdown-actions {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface);
}

.sector-action-btn {
    flex: 1;
    padding: 4px 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.sector-action-btn:hover {
    opacity: 0.9;
}

.sector-options {
    overflow-y: auto;
    max-height: 240px;
}

.sector-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.sector-option:hover {
    background: var(--surface-hover);
}

.sector-option input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.sector-option label {
    cursor: pointer;
    flex: 1;
}

/* ============================================================================
   FILTER SUMMARY (for preferreds.html)
   ============================================================================ */
.filter-summary {
    margin-left: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

/* ============================================================================
   RANGE HISTOGRAM (for preferreds.html and bonds.html)
   ============================================================================ */
.range-histogram-container {
    position: relative;
}

.range-histogram {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 50px;
    margin-bottom: 4px;
    padding: 0 4px;
    gap: 1px;
}

.histogram-bar {
    flex: 1;
    background: linear-gradient(to top, #0066cc, #4d94ff);
    border-radius: 2px 2px 0 0;
    min-width: 2px;
    transition: all 0.2s;
    cursor: pointer;
}

.histogram-bar:hover {
    opacity: 0.7;
}

.histogram-bar.greyed-out {
    background: linear-gradient(to top, #cbd5e0, #e2e8f0);
    opacity: 0.4;
}

.histogram-x-axis {
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
    margin-bottom: 8px;
    font-size: 10px;
    color: var(--text-secondary);
}

/* ============================================================================
   FEEDS PAGE STYLES (for feeds.html)
   ============================================================================ */
.search-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-controls .search-wrapper {
    flex: 1;
    min-width: 250px;
}

.source-filter-wrapper {
    position: relative;
    min-width: 250px;
}

.source-filter {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.source-filter:hover {
    border-color: #0066cc;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
    flex: 1;
    padding-right: 20px;
}

.modal-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    border: none;
    background: none;
    padding: 0;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
}

.modal-body {
    padding: 30px;
}

.modal-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.modal-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.modal-meta-item strong {
    color: #333;
}

.modal-description {
    color: #444;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 20px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

.modal-footer a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
}

.modal-footer a:hover {
    background-color: #0052a3;
}

.modal-footer button:hover {
    background-color: #0052a3;
}

.title-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.title-link:hover {
    text-decoration: underline;
}

.ag-row {
    cursor: pointer;
}

/* Source modal checkbox styling */
#sourceModalOptions input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#sourceModalOptions label {
    font-size: 15px;
}
