:root{
    --fx-primary:#0f172a;
    --fx-primary-2:#114e92;
    --fx-secondary:#1e293b;
    --fx-accent:#2563eb;
    --fx-accent-2:#38bdf8;
    --fx-success:#10b981;
    --fx-warning:#f59e0b;
    --fx-danger:#ef4444;
    --fx-bg:#f8fafc;
    --fx-card:#ffffff;
    --fx-text:#0f172a;
    --fx-muted:#64748b;
    --fx-border:#e2e8f0;
    --fx-shadow:0 10px 30px rgba(15,23,42,.08);
    --fx-radius:20px;
}

body{
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
    color: var(--fx-text);
}

main{
    padding: 20px;
    padding-top: 24px !important;
    padding-bottom: 40px !important;
}

.container.shadow.p-2.bg-light.mt-3{
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Sidebar base */
nav{
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 10px;
}

.nav-item{
    border-bottom: 1px solid #ddd;
}

.nav-link{
    padding: 10px 15px;
    font-weight: 600;
    cursor: pointer;
    display: block;
    text-align: center;
    color: var(--fx-text) !important;
    border: 1px solid var(--fx-border) !important;
    background: #fff !important;
    border-radius: 14px !important;
    transition: all 0.2s ease;
    margin: 5px 0;
    box-shadow: 0 3px 10px rgba(15,23,42,.04);
}

.nav-link:hover{
    transform: translateY(-1px);
    background: linear-gradient(135deg, #eff6ff, #f8fbff) !important;
    border-color: #bfdbfe !important;
    color: var(--fx-text) !important;
}

.nav-link.active,
.nav-link.active-tab{
    background: linear-gradient(135deg, var(--fx-primary), var(--fx-accent)) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 10px 20px rgba(37,99,235,.20);
}

.nav-link:not(.active){
    background-color: white;
}

/* Tabs */
.nav-tabs{
    border: none;
}

.nav-tabs .nav-link{
    font-weight: 800 !important;
    color: var(--fx-text) !important;
    border: none !important;
    border-radius: 999px !important;
    margin-right: 5px;
    background: #e2e8f0 !important;
    padding: 10px 18px !important;
}

.nav-tabs .nav-link.active{
    background: linear-gradient(135deg, var(--fx-primary), var(--fx-accent)) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(37,99,235,.20);
}

/* Tab pane */
.tab-pane{
    display: none;
}

/* Headings */
.sidebar-heading{
    text-align: center;
    font-weight: 800;
    color: #fff !important;
    background: linear-gradient(135deg, var(--fx-primary), var(--fx-accent));
    padding: 10px 14px !important;
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 14px;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* Content section */
.content-section{
    display: none;
    animation: fxFade .25s ease;
}

.content-section.active{
    display: block;
}

@keyframes fxFade{
    from{opacity:0; transform: translateY(8px);}
    to{opacity:1; transform: translateY(0);}
}

/* Hero */
.fx-hero{
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 42px 28px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15,23,42,.92), rgba(37,99,235,.88)),
        url('/images/background2.jpg');
    background-size: cover;
    background-position: center;
    box-shadow: 0 20px 50px rgba(15,23,42,.22);
    margin-bottom: 24px;
}

.fx-hero::before{
    content:"";
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at top right, rgba(56,189,248,.28), transparent 30%),
        radial-gradient(circle at bottom left, rgba(255,255,255,.10), transparent 25%);
    pointer-events:none;
}

.fx-hero > *{
    position: relative;
    z-index: 1;
}

.fx-badge{
    display:inline-block;
    padding:8px 14px;
    border-radius:999px;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.18);
    font-size:12px;
    font-weight:700;
    letter-spacing:.4px;
    margin-bottom:14px;
    text-transform: uppercase;
}

.fx-hero h1{
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.fx-hero p{
    max-width: 900px;
    margin: 0 auto;
    opacity: .95;
    font-size: 15px;
}

/* Dashboard shell */
.fx-dashboard-shell{
    width: 97%;
    max-width: 1400px;
    margin: 0 auto 30px auto;
    background: rgba(255,255,255,.75);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(15,23,42,.12);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    overflow: hidden;
}

.fx-dashboard-header{
    background: linear-gradient(135deg, var(--fx-primary), var(--fx-accent));
    color: white;
    padding: 16px 22px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .3px;
}

.fx-dashboard-body{
    padding: 18px;
}

/* Sidebar */
.fx-sidebar{
    background: rgba(255,255,255,.82);
    border: 1px solid var(--fx-border);
    border-radius: 22px;
    padding: 16px;
    box-shadow: var(--fx-shadow);
    position: sticky;
    top: 20px;
}

.fx-sidebar .nav-link,
nav .nav-link{
    color: var(--fx-text) !important;
    background: #fff !important;
    border: 1px solid var(--fx-border) !important;
    border-radius: 14px !important;
    padding: 10px 14px !important;
    margin-bottom: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    transition: all .2s ease;
    box-shadow: 0 3px 10px rgba(15,23,42,.04);
    cursor: pointer;
}

.fx-sidebar .nav-link:hover,
nav .nav-link:hover{
    transform: translateY(-1px);
    background: linear-gradient(135deg, #eff6ff, #f8fbff) !important;
    border-color: #bfdbfe !important;
}

.fx-sidebar .nav-link.active,
.fx-sidebar .nav-link.active-tab,
nav .nav-link.active,
nav .nav-link.active-tab{
    background: linear-gradient(135deg, var(--fx-primary), var(--fx-accent)) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 10px 20px rgba(37,99,235,.20);
}

.fx-main{
    min-width: 0;
}

/* Rate tabs */
#rateTabs{
    gap: 10px;
    border-bottom: none !important;
    margin-bottom: 20px !important;
}

#rateTabs .nav-link{
    border: none !important;
    border-radius: 999px !important;
    padding: 10px 18px !important;
    font-weight: 800 !important;
    color: var(--fx-text) !important;
    background: #e2e8f0 !important;
}

#rateTabs .nav-link.active{
    background: linear-gradient(135deg, var(--fx-primary), var(--fx-accent)) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(37,99,235,.20);
}

/* Panel */
.fx-panel{
    background: rgba(255,255,255,.88);
    border: 1px solid var(--fx-border);
    border-radius: 22px;
    box-shadow: var(--fx-shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.fx-panel-title{
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--fx-text);
}

.fx-panel-subtitle{
    color: var(--fx-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.fx-panel-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:16px;
}

.fx-chip{
    display:inline-flex;
    align-items:center;
    padding:7px 12px;
    border-radius:999px;
    background:#eff6ff;
    color:#1d4ed8;
    font-size:12px;
    font-weight:700;
    border:1px solid #bfdbfe;
}

.fx-chart-title{
    font-size: 14px;
    color: var(--fx-muted);
    font-weight: 700;
    margin-bottom: 14px;
}

/* Chart container */
.chart-container{
    margin-top: 20px;
    width: 100%;
    height: 100%;
    max-height: 500px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
    border: 1px solid var(--fx-border) !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 25px rgba(15,23,42,.05) !important;
    padding: 18px !important;
    min-height: 380px;
}

#barChart,
#barChart-eur,
#barChart-jpy,
#barChart-gbp,
#barChart-aud,
#barChart-cad,
#barChart-chf,
#barChart-nzd,
#barChart-inflation-usd,
#barChart-inflation-eur,
#barChart-inflation-jpy,
#barChart-inflation-gbp,
#barChart-inflation-aud,
#barChart-inflation-cad,
#barChart-inflation-chf,
#barChart-inflation-nzd{
    width: 100% !important;
    height: 100% !important;
}

/* Date tabs */
.date-tabs{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:18px;
}

.date-tabs button,
.date-tab{
    font-size: 14px;
    color: var(--fx-text) !important;
    border: 1px solid var(--fx-border) !important;
    border-radius: 14px !important;
    padding: 10px 14px !important;
    background: #fff !important;
    font-weight: 700 !important;
    transition: all .2s ease;
    margin: 4px !important;
}

.date-tabs .active-tab,
.date-tabs button.active,
.date-tab.active{
    background: linear-gradient(135deg, var(--fx-accent), var(--fx-accent-2)) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 10px 20px rgba(37,99,235,.20);
}

.date-tabs button:hover,
.date-tab:hover{
    transform: translateY(-1px);
    border-color: var(--fx-accent) !important;
}

/* Table */
.custom-table{
    width: 100%;
    font-size: 12px;
    text-align: center;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--fx-border);
    margin-bottom: 0 !important;
}

.custom-table th{
    background: linear-gradient(180deg, #eff6ff 0%, #e0f2fe 100%);
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--fx-border);
    text-align: center;
    white-space: nowrap;
}

.custom-table td{
    font-size: 13px;
    padding: 13px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}

.custom-table tr:hover td{
    background: #f8fbff;
}

/* Layout helpers */
.tab-pane .row{
    margin: 0;
    padding: 0;
}

.row.mt-2 .col-md-6{
    padding: 0 10px;
}

.feature-box:hover{
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 991px){
    .fx-sidebar{
        position: relative;
        top: 0;
        margin-bottom: 18px;
    }

    .container.shadow.p-2.bg-light.mt-3{
        width: 100% !important;
        border-width: 12px !important;
    }
}

@media (max-width: 767px){
    .chart-container{
        height: 450px;
    }
}

@media (min-width: 768px){
    .chart-container{
        height: 500px;
    }
}

@media (min-width: 1024px){
    .chart-container{
        height: 600px;
    }
}

@media (max-width: 768px){
    .fx-hero{
        padding: 28px 18px;
        border-radius: 20px;
    }

    .fx-hero h1{
        font-size: 1.6rem;
    }

    .fx-dashboard-shell{
        width: 100%;
        border-radius: 18px;
    }

    .fx-dashboard-body{
        padding: 12px;
    }

    .fx-panel,
    .fx-sidebar{
        border-radius: 18px;
        padding: 14px;
    }

    .chart-container{
        border-radius: 18px !important;
        min-height: 300px;
    }
}