/* Queen City Economics - Modern Sleek Design */

/* ============================================================================
   GLOBAL STYLES - Modern Dark Theme
   ============================================================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   HEADER STYLING - Modern Sleek Header
   ============================================================================ */

.qce-header {
    background: linear-gradient(180deg, #000000 0%, #0f0f0f 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.qce-logo {
    font-size: 22px;
    font-weight: 200;
    letter-spacing: 12px;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.qce-logo:hover {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
    letter-spacing: 14px;
}

/* ============================================================================
   TAB NAVIGATION - Modern Sleek Tabs
   ============================================================================ */

.qce-tabs {
    background: linear-gradient(180deg, #0f0f0f 0%, #000000 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 0 !important;
    padding: 0 48px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Override all tab elements */
.qce-tab,
.qce-tab > div,
.qce-tab > span,
[role="tab"],
[role="tab"] > *,
[data-value] {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    letter-spacing: 3px !important;
    padding: 18px 24px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-transform: uppercase !important;
    position: relative !important;
}

.qce-tab:hover,
.qce-tab:hover > div,
.qce-tab:hover > span,
[role="tab"]:hover,
[role="tab"]:hover > * {
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px);
}

.qce-tab--selected,
.qce-tab--selected > div,
.qce-tab--selected > span,
[role="tab"][aria-selected="true"],
[role="tab"][aria-selected="true"] > * {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 2px solid #ffffff !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 -2px 12px rgba(255, 255, 255, 0.1);
}

/* Force override all Dash defaults */
.tabs,
.tabs > div,
[role="tablist"],
[role="tablist"] > *,
div[class*="tab"],
div[class*="Tab"],
span[class*="tab"],
span[class*="Tab"] {
    background: transparent !important;
}

/* ============================================================================
   MAIN CONTENT CONTAINER
   ============================================================================ */

.qce-main-container {
    padding: 40px 48px;
    max-width: 1920px;
    margin: 0 auto;
}

/* ============================================================================
   CARD STYLING - Modern Glass-Morphism Cards
   ============================================================================ */

.card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(18, 18, 18, 0.9) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 2px 8px rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6),
                0 4px 16px rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.card-header {
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    padding: 18px 24px !important;
    position: relative;
}

.card-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.2) 100%);
}

.card-body {
    padding: 24px !important;
    background: rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   TABLE STYLING - Modern Economic Indicators Table
   ============================================================================ */

.qce-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.qce-table thead {
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.qce-table th {
    padding: 16px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.qce-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

.qce-table tbody tr {
    background: rgba(10, 10, 10, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qce-table tbody tr:nth-child(even) {
    background: rgba(15, 15, 15, 0.4);
}

.qce-table tbody tr:hover {
    background: rgba(30, 30, 30, 0.6);
    transform: scale(1.01);
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.05);
}

/* ============================================================================
   FOOTER STYLING - Modern Sleek Footer
   ============================================================================ */

.qce-footer {
    background: linear-gradient(180deg, #0a0a0a 0%, #000000 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 60px 48px 40px;
    margin-top: 80px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}

.qce-footer-content {
    max-width: 1920px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 50px;
}

.qce-footer-section h4 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    padding-bottom: 10px;
}

.qce-footer-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, transparent 100%);
}

.qce-footer-section ul {
    list-style: none;
    padding: 0;
}

.qce-footer-section ul li {
    margin-bottom: 10px;
}

.qce-footer-section ul li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    display: inline-block;
}

.qce-footer-section ul li a:hover {
    color: rgba(255, 255, 255, 1);
    transform: translateX(5px);
}

.qce-social-icons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.qce-social-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.qce-social-icon:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
}

.qce-footer-logo {
    width: 150px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.qce-footer-logo:hover {
    opacity: 1;
}

.qce-copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1.5px;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.text-danger {
    color: #ff4757 !important;
}

.text-success {
    color: #2ed573 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-3 {
    margin-bottom: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

.text-center {
    text-align: center !important;
}

.text-end {
    text-align: right !important;
}

.h-100 {
    height: 100% !important;
}

/* ============================================================================
   CHART ENHANCEMENTS
   ============================================================================ */

.js-plotly-plot {
    border-radius: 8px;
    overflow: hidden;
}

/* Plotly chart background override */
.main-svg {
    background: transparent !important;
}

/* Loading States */
._dash-loading {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

._dash-loading-callback {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    letter-spacing: 2px;
}

/* ============================================================================
   SCROLLBAR STYLING
   ============================================================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 10, 10, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 5px;
    border: 2px solid rgba(10, 10, 10, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ============================================================================
   ENHANCED ROW SPACING
   ============================================================================ */

.row {
    margin-bottom: 24px;
}

.row:last-child {
    margin-bottom: 0;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1400px) {
    .qce-header {
        padding: 20px 32px;
    }

    .qce-tabs {
        padding: 0 32px !important;
    }

    .qce-main-container {
        padding: 32px;
    }
}

@media (max-width: 1200px) {
    .qce-footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 992px) {
    .qce-logo {
        font-size: 18px;
        letter-spacing: 8px;
    }

    .qce-tab,
    .qce-tab > div,
    .qce-tab > span,
    [role="tab"],
    [role="tab"] > * {
        font-size: 12px !important;
        letter-spacing: 2px !important;
        padding: 16px 18px !important;
    }
}

@media (max-width: 768px) {
    .qce-header {
        flex-direction: column;
        padding: 20px 24px;
    }

    .qce-logo {
        font-size: 16px;
        letter-spacing: 6px;
        margin-bottom: 16px;
    }

    .qce-logo:hover {
        letter-spacing: 7px;
    }

    .qce-tabs {
        padding: 0 16px !important;
    }

    .qce-tab,
    .qce-tab > div,
    .qce-tab > span,
    [role="tab"],
    [role="tab"] > * {
        font-size: 11px !important;
        letter-spacing: 1.5px !important;
        padding: 14px 12px !important;
    }

    .qce-main-container {
        padding: 24px 16px;
    }

    .card {
        margin-bottom: 16px;
    }

    .card-header {
        font-size: 12px !important;
        padding: 14px 16px !important;
    }

    .card-body {
        padding: 16px !important;
    }

    .qce-footer {
        padding: 40px 24px 32px;
    }

    .qce-footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .qce-table th {
        font-size: 10px;
        padding: 12px 8px;
    }

    .qce-table td {
        font-size: 12px;
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .qce-logo {
        font-size: 14px;
        letter-spacing: 4px;
    }

    .qce-header {
        padding: 16px 16px;
    }

    .qce-tabs {
        padding: 0 8px !important;
    }

    .qce-main-container {
        padding: 16px 12px;
    }

    .card {
        border-radius: 8px !important;
    }

    .row {
        margin-bottom: 16px;
    }
}
