/* Unified Topbar - Matches Homepage Navbar Exactly */
/* Top Navigation Bar */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 48px;
}

.navbar-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 40px;
}

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

.navbar-logo span {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-size: 12px;
    font-weight: 400;
    color: #1d1d1f;
    text-decoration: none;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover {
    opacity: 0.6;
}

.nav-link i {
    font-size: 10px;
    transition: transform 0.2s;
}

.nav-item:hover .nav-link i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    margin-top: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    padding: 6px;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
}

.dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: white;
}

.dropdown-item {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    color: #1d1d1f;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: #f5f5f7;
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 6px 0;
}

/* Date Filter in Topbar */
.navbar-date-filter {
    margin-left: auto;
    position: relative;
}

.btn-topbar-date-filter {
    padding: 6px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #1d1d1f;
    min-width: 200px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.btn-topbar-date-filter:hover {
    background: #f5f5f7;
    border-color: rgba(0, 0, 0, 0.2);
}

.topbar-date-filter-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    overflow: hidden;
}

.topbar-date-filter-preset {
    font-size: 11px;
    font-weight: 500;
    color: #1d1d1f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-date-filter-range {
    font-size: 9px;
    color: #86868b;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-date-filter-icon {
    font-size: 8px;
    opacity: 0.6;
}

.topbar-date-filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 340px;
    box-sizing: border-box;
    overflow: visible;
    min-height: 240px;
}

.topbar-date-filter-dropdown.hidden {
    display: none;
}

.topbar-filter-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.topbar-dropdown-section-title {
    font-size: 10px;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.topbar-custom-date-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-end;
}

.topbar-custom-date-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.topbar-custom-date-label {
    font-size: 10px;
    font-weight: 500;
    color: #1d1d1f;
}

.topbar-custom-date-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 11px;
    outline: none;
    transition: border-color 0.2s;
}

.topbar-custom-date-input:focus {
    border-color: #0071e3;
}

.topbar-custom-date-apply {
    padding: 6px 12px;
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.topbar-custom-date-apply:hover {
    opacity: 0.8;
}

.topbar-period-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    width: 100%;
    grid-auto-rows: minmax(32px, auto);
}

.topbar-period-option {
    padding: 8px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 10px;
    font-weight: 500;
    color: #1d1d1f;
    text-align: center;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.topbar-period-option:hover {
    background: #f5f5f7;
}

.topbar-period-option.active {
    background: #0071e3;
    color: white;
    border-color: #0071e3;
}

@media (max-width: 768px) {
    .navbar-links {
        display: none;
    }
    
    .navbar-date-filter {
        display: none;
    }
}
