:root {
    --bg-main: #080b11;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --card-bg: rgba(17, 24, 39, 0.6);
    --card-bg-hover: rgba(24, 33, 53, 0.85);
    --border-base: rgba(255, 255, 255, 0.08);
    
    --accent-ytd: #d946ef;
    --accent-yesterday: #f59e0b;
    --accent-weekly: #10b981;
    --accent-labour: #f43f5e;
    --accent-boats: #06b6d4;
    --accent-white: #ffffff;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 0%, rgba(6, 182, 212, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.08) 0px, transparent 50%);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-attachment: fixed;
}

h1 {
    font-family: 'Lexend', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.35rem;
    text-align: center;
    margin: 40px 0 20px 0;
    padding: 1rem 0;
    color: white;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(17, 24, 39, 0.4) 15%,
            rgba(17, 24, 39, 0.8) 50%,
            rgba(17, 24, 39, 0.4) 85%,
            transparent 100%);
    border-bottom: 2px solid;
    border-top: 2px solid;
    border-image: linear-gradient(90deg,
            transparent 0%,
            rgba(139, 92, 246, 0.3) 15%,
            rgba(6, 182, 212, 1) 50%,
            rgba(236, 72, 153, 0.3) 85%,
            transparent 100%) 1;
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
    width: 100%;
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

h1:hover {
    text-shadow: 0 0 25px rgba(6, 182, 212, 0.8);
    letter-spacing: 0.4rem;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(31, 41, 55, 0.6) 15%,
            rgba(17, 24, 39, 0.9) 50%,
            rgba(31, 41, 55, 0.6) 85%,
            transparent 100%);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.rem;
        padding: 0.3rem 0.3rem;
    }
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.title {
    margin-left: 15px;
    font-size: 24px;
    margin-right: 12px;
    font-weight: bold;
    text-align: center;
}

.tooltip {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 25px;
    display: block;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    max-width: 300px;
    min-width: 200px;
    box-sizing: border-box;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .tooltip::after {
        display: none !important;
    }
}

.totalM {
    font-size: 21px;
    color: rgb(255, 255, 255);
    border: 2px solid white;
    border-radius: 25px;
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: 2px;
    padding-top: 2px;
    margin-right: 7px;
    text-align: center;
}

.totalB {
    font-size: 21px;
    color: rgb(255, 255, 255);
    border: 2px solid white;
    border-radius: 25px;
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: 2px;
    padding-top: 2px;
    margin-right: 20px;
    text-align: center;
}

#migrantChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #migrantChart {
        height: 330px;
    }
}

#boatChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #boatChart {
        height: 330px;
    }
}

.monthly-totals,
.yearly-totals,
.migrantarrival-xdays,
.migrantarrival-xdays-average,
.migrantarrival-labour,
.yearly-boats-totals {
    margin: 10px auto;
    width: 83.2%;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 20px 15px;
    color: var(--text-primary);
    font-size: 18px;
    border-radius: 20px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 1px 1px 0 rgba(255, 255, 255, 0.05) inset;
    max-width: 1200px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-base);
    box-sizing: border-box;
}

/* Individual card glows */
.monthly-totals {
    border: 1px solid rgba(6, 182, 212, 0.2);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.05);
}
.monthly-totals:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6), 0 0 25px rgba(6, 182, 212, 0.15);
    background: var(--card-bg-hover);
    transform: translateY(-3px);
}

.yearly-totals {
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.05);
}
.yearly-totals:hover {
    border-color: rgba(245, 158, 11, 0.4) !important;
    box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.15);
    background: var(--card-bg-hover);
    transform: translateY(-3px);
}

.migrantarrival-xdays {
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(139, 92, 246, 0.05);
    justify-content: center;
    align-items: center;
    text-align: center;
}
.migrantarrival-xdays:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6), 0 0 25px rgba(139, 92, 246, 0.15);
    background: var(--card-bg-hover);
    transform: translateY(-3px);
}

.migrantarrival-xdays-average {
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 185, 129, 0.05);
    justify-content: center;
    align-items: center;
    text-align: center;
}
.migrantarrival-xdays-average:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6), 0 0 25px rgba(16, 185, 129, 0.15);
    background: var(--card-bg-hover);
    transform: translateY(-3px);
}

.migrantarrival-labour {
    border: 1px solid rgba(244, 63, 94, 0.2);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(244, 63, 94, 0.05);
    justify-content: center;
    align-items: center;
    text-align: center;
}
.migrantarrival-labour:hover {
    border-color: rgba(244, 63, 94, 0.4);
    box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6), 0 0 25px rgba(244, 63, 94, 0.15);
    background: var(--card-bg-hover);
    transform: translateY(-3px);
}

.yearly-boats-totals {
    border: 1px solid var(--border-base);
}
.yearly-boats-totals:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--card-bg-hover);
    transform: translateY(-3px);
}

/* Metric capsules styling */
.year-total,
.year-boats-total,
#migrantsCount7,
#migrantsCount14,
#migrantsCount30,
#migrantsCount180,
#migrantsCount365,
#totalBoats7,
#totalBoats14,
#totalBoats30,
#totalBoats180,
#totalBoats365,
#totalMigrant7Average,
#totalMigrant14Average,
#totalMigrant30Average,
#totalMigrant180Average,
#totalMigrant365Average,
#totalBoat7Average,
#totalBoat14Average,
#totalBoat30Average,
#totalBoat180Average,
#totalBoat365Average,
#totalMigrantsLabour,
#totalBoatsLabour,
#totalMigrantCostSinceLabour {
    display: inline-block;
    margin: 10px;
    padding: 12px 15px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 165px;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

.year-total:hover,
.year-boats-total:hover,
#migrantsCount7:hover,
#migrantsCount14:hover,
#migrantsCount30:hover,
#migrantsCount180:hover,
#migrantsCount365:hover,
#totalBoats7:hover,
#totalBoats14:hover,
#totalBoats30:hover,
#totalBoats180:hover,
#totalBoats365:hover,
#totalMigrant7Average:hover,
#totalMigrant14Average:hover,
#totalMigrant30Average:hover,
#totalMigrant180Average:hover,
#totalMigrant365Average:hover,
#totalBoat7Average:hover,
#totalBoat14Average:hover,
#totalBoat30Average:hover,
#totalBoat180Average:hover,
#totalBoat365Average:hover,
#totalMigrantsLabour:hover,
#totalBoatsLabour:hover,
#totalMigrantCostSinceLabour:hover {
    transform: scale(1.04);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.totalM, .totalB {
    font-size: 18px;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 4px 10px;
    margin-right: 7px;
    text-align: center;
    transition: all 0.2s ease;
}

.totalM:hover, .totalB:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.monthly-totals h2, .yearly-totals h2, .yearly-totals h3 {
    text-align: center;
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 20px;
    font-family: 'Lexend', sans-serif;
    font-weight: 700;
}

.year-total {
    border-color: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.05);
}

.year-boats-total {
    border-color: rgba(251, 146, 60, 0.25);
    box-shadow: 0 0 8px rgba(251, 146, 60, 0.05);
}

#yearlyTotals, #yearlyBoatsTotals {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.colour-text {
    color: rgb(205, 155, 250);
    font-weight: bold;
    text-shadow: 1px 1px 2px rgb(0, 0, 0), 0 0 1em rgb(0, 0, 0), 0 0 0.2em rgb(0, 0, 0);
}

.colour-text-two {
    color: rgb(207, 176, 234);
    font-weight: normal;
    text-shadow: 1px 1px 2px rgb(0, 0, 0), 0 0 1em rgb(0, 0, 0), 0 0 0.2em rgb(0, 0, 0);
}

.spaced {
    margin-top: 8px;
    font-size: 16px;
}

/* Specific metrics configurations overrides */
#migrantsCount7, #migrantsCount14, #migrantsCount30, #migrantsCount180, #migrantsCount365 {
    border-color: rgba(6, 182, 212, 0.25);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.05);
}
#totalBoats7, #totalBoats14, #totalBoats30, #totalBoats180, #totalBoats365 {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.05);
}
#totalMigrant7Average, #totalMigrant14Average, #totalMigrant30Average, #totalMigrant180Average, #totalMigrant365Average {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.05);
}
#totalBoat7Average, #totalBoat14Average, #totalBoat30Average, #totalBoat180Average, #totalBoat365Average {
    border-color: rgba(52, 211, 153, 0.25);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.05);
}
#totalMigrantsLabour, #totalBoatsLabour, #totalMigrantCostSinceLabour {
    border-color: rgba(244, 63, 94, 0.25);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.05);
    width: 200px;
}
#totalMigrantsLabour .colour-text,
#totalBoatsLabour .colour-text {
    font-size: 2.2em;
    font-weight: 800;
    color: var(--text-primary);
}
#totalMigrantCostSinceLabour .colour-text {
    font-size: 1.2em;
    font-weight: 800;
    color: var(--text-primary);
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #080b11;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.rowing-boat {
    width: 100px;
    height: 60px;
    position: relative;
    animation: rowing 2s infinite ease-in-out;
}

.boat {
    width: 80px;
    height: 30px;
    background: #6b4423;
    border-radius: 0 0 40px 40px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.rower {
    width: 20px;
    height: 30px;
    background: #555555;
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    animation: rowing-body 1s infinite ease-in-out;
}

.oars {
    width: 100px;
    height: 10px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.oar-left,
.oar-right {
    width: 40px;
    height: 4px;
    background: #888;
    position: absolute;
    top: 50%;
    transform-origin: center;
}

.oar-left {
    left: 0;
    animation: row-left 1s infinite ease-in-out;
}

.oar-right {
    right: 0;
    animation: row-right 1s infinite ease-in-out;
}

.water {
    width: 200px;
    height: 10px;
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

.wave {
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: wave 2s infinite linear;
}

@keyframes rowing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes rowing-body {

    0%,
    100% {
        transform: translateX(-50%) rotate(-10deg);
    }

    50% {
        transform: translateX(-50%) rotate(10deg);
    }
}

@keyframes row-left {

    0%,
    100% {
        transform: rotate(-45deg);
    }

    50% {
        transform: rotate(0deg);
    }
}

@keyframes row-right {

    0%,
    100% {
        transform: rotate(45deg);
    }

    50% {
        transform: rotate(0deg);
    }
}

@keyframes wave {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

#monthlyOverlayMigrantsChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 520px !important;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #monthlyOverlayMigrantsChart {
        height: 330px !important;
    }
}

#annualRunRateChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 520px !important;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #annualRunRateChartContainer {
        height: 350px !important;
    }

    #annualRunRateChart {
        height: 100% !important;
    }
}

#migrantGenderChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 520px !important;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #migrantGenderChart {
        height: 330px !important;
    }
}

#migrantGenderPieChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 520px !important;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #migrantGenderPieChart {
        height: 330px !important;
    }
}

.site-footer {
    margin-top: 40px;
    padding: 30px 20px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content p {
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.6;
}

.footer-content a {
    color: #3b82f6;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-content a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 15px;
    }

    .footer-content p {
        font-size: 12px;
    }
}

.top-arrivals {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    margin: 1rem 0;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.top-arrivals {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    margin: 1rem 0;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.top-entry {
    display: inline-block;
    margin: 10px;
    padding: 15px;
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    width: 300px;
    text-align: center;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.05);
    transition: all 0.25s ease;
}

.top-entry:hover {
    transform: scale(1.04);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.25);
}

.top-entry .rank {
    font-weight: 800;
    font-size: 1.8rem;
    color: #f59e0b;
    margin-right: 10px;
}

.top-entry .migrants {
    font-weight: 800;
    font-size: 1.5rem;
    color: #d946ef;
    margin: 0 10px;
}

.top-entry .date {
    color: var(--text-secondary);
    margin-left: 10px;
    display: inline-block;
}

.monthly-totals.top-migrant-arrivals {
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

.monthly-totals.top-migrant-arrivals:hover {
    border-color: rgba(139, 92, 246, 0.5) !important;
    background: var(--card-bg-hover);
    box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6), 0 0 25px rgba(139, 92, 246, 0.15);
}

#ytdMigrantCount {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #chartContainer {
        height: 330px !important;
    }

    #ytdMigrantCount {
        height: 100% !important;
    }
}

#currentMonthMigrantsChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #currentMonthMigrantsChartContainer {
        height: 330px !important;
    }

    #currentMonthMigrantsChart {
        height: 100% !important;
    }
}

#totalMigrantsByYearChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #totalMigrantsByYearChartContainer {
        height: 330px !important;
    }

    #totalMigrantsByYearChart {
        height: 100% !important;
    }
}

#averageMigrantsPerBoatChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #averageMigrantsPerBoatChart {
        height: 330px;
    }
}

#weeklyBoatChart {
    display: block;
    margin: 0 auto;
    width: 95%;
    height: auto;
    padding-bottom: 5px;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: center;
    max-width: 1200px;
    width: 100%;
    height: 400px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    #weeklyBoatChartContainer {
        height: 330px;
    }

    #weeklyBoatChart {
        height: 330px;
    }
}

.percentage-change-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.3);
    table-layout: fixed;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.percentage-change-table th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    padding: 15px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.percentage-change-table td {
    padding: 14px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 14px;
    color: var(--text-secondary);
}

.percentage-change-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
}

.percentage-change-table tr:last-child td {
    border-bottom: none;
}

.positive-change {
    color: #34d399;
    font-weight: bold;
}

.negative-change {
    color: #f87171;
    font-weight: bold;
}

.amber-warning {
    color: #fbbf24;
    font-weight: bold;
}

@media (max-width: 768px) {
    .percentage-change-table {
        font-size: 12px;
        table-layout: auto;
    }

    .percentage-change-table th,
    .percentage-change-table td {
        padding: 8px 5px;
        font-size: 12px;
        width: auto;
    }
}

#ytdPercentChange {
    font-size: 1.3em;
    font-weight: 800;
    padding: 8px 0 2px 0;
}

#ytdMigrantsTable th {
    font-size: 1.2em;
    font-weight: bold;
    padding: 16px 10px;
}

#ytdMigrantsTable td {
    font-size: 1.2em;
    padding: 14px 10px;
}

#channelConditionsContainer {
    max-height: 400px;
    overflow-y: auto;
}

#channelConditionsContainer .percentage-change-table {
    margin: 5px 0;
}

#channelConditionsContainer .percentage-change-table th {
    padding: 10px 5px;
}

#channelConditionsContainer .percentage-change-table td {
    padding: 12.3px 5px;
}

#ytdInfo {
    font-style: italic;
}

#monthlyCalendarSection {
    margin: 0 auto;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 16px;
    padding: 15px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calendar-arrow {
    cursor: pointer;
    font-size: 1.4em !important;
    user-select: none;
    padding: 0 0;
    color: var(--text-primary);
    transition: color 0.2s;
    min-width: 2.5em;
    width: 2.5em !important;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
}

.calendar-arrow:hover {
    color: #8b5cf6;
}

.calendar-title {
    font-size: 1.2em;
    font-weight: bold;
    font-family: 'Lexend', sans-serif;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    color: var(--text-secondary);
    padding-bottom: 4px;
    font-size: 0.9em;
}

.calendar-day {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    min-height: 48px;
    text-align: center;
    padding: 4px 0 0 0;
    font-size: 0.95em;
    position: relative;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.calendar-day:hover:not(.empty) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.calendar-day.today {
    background: rgba(139, 92, 246, 0.12);
    color: #fff;
    font-weight: bold;
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.35);
}

.calendar-day .migrants {
    display: block;
    font-size: 0.95em;
    color: #8b5cf6;
    margin-top: 2px;
    font-weight: bold;
}

.calendar-day.empty {
    background: transparent;
    border: none;
    box-shadow: none;
}

.calendar-day[data-migrants="0"] .migrants {
    color: var(--text-secondary);
    opacity: 0.5;
    font-weight: normal;
}

.monthly-totals>h2+#monthlyCalendarSection {
    margin-top: 10px;
}

.ytd-section {
    border: 1px solid rgba(139, 92, 246, 0.25) !important;
}

.ytd-section:hover {
    box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6), 0 0 25px rgba(139, 92, 246, 0.15);
}

/* Global Grid Layout for Desktop (3 Columns) */
@media (min-width: 1024px) {
    .main-content-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        width: 100% !important;
        max-width: 1920px !important;
        margin: 20px auto -15% auto;
        /* Reduce scale of all content except header/footer */
        transform: scale(0.95);
        transform-origin: top center;
    }

    .main-content-grid>h1,
    .main-content-grid>.header-row {
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .main-content-grid>div:not(.header-row):not(h1) {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    .main-content-grid canvas {
        width: 100% !important;
        height: auto !important;
        max-height: 400px;
    }

    /* Top Section */
    #section-annual-run-rate {
        order: 1;
    }

    #section-calendar {
        order: 2;
    }

    #section-ytd-chart {
        order: 3;
    }

    #section-yesterday {
        order: 4;
    }

    #section-ytd-arrival {
        order: 5;
    }

    #section-avg-weekly {
        order: 6;
    }

    #section-today-prediction {
        order: 7;
    }

    #section-labour-stats {
        order: 8;
    }

    #section-monthly-overlay {
        order: 9;
    }

    #section-migrant-gender {
        order: 10;
    }

    #section-migrant-gender-pie {
        order: 11;
    }

    #section-channel-conditions {
        order: 12;
    }


    /* Tools Header */
    #header-tools {
        order: 20;
    }

    /* Tools Section */
    #section-past-7-days {
        order: 21;
    }

    #section-calculator {
        order: 22;
    }

    #section-petitions-widget {
        order: 23;
    }

    #section-yearly-arrivals {
        order: 24;
    }

    #section-ytd-comparison {
        order: 25;
    }

    #section-zero-days {
        order: 26;
    }

    #section-migrant-gender-table {
        order: 27;
    }

    #section-tomorrow-prediction {
        order: 28;
    }


    /* More Charts Header */
    #header-more-charts {
        order: 40;
    }

    /* More Charts Section */
    #section-boat-totals {
        order: 41;
    }

    #section-total-migrants-year {
        order: 42;
    }

    #section-avg-per-boat {
        order: 43;
    }

    #section-current-month {
        order: 44;
    }

    #section-weekly-boat {
        order: 45;
    }

    #section-monthly-totals {
        order: 46;
    }

    /* Just Numbers Header */
    #header-just-numbers {
        order: 60;
    }

    /* Just Numbers Section */
    #section-xdays-totals {
        order: 61;
    }

    #section-yearly-totals {
        order: 62;
    }

    #section-daily-averages {
        order: 63;
    }

    #topMigrantArrivals {
        order: 70;
    }
}

.top-header {
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    width: 32px;
    height: 32px;
    margin-right: 12px;
}

.header-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Lexend', sans-serif;
    letter-spacing: 0.05rem;
}

.header-right {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.channel-conditions-label {
    color: var(--text-secondary);
    margin-left: 20px;
    margin-right: 8px;
    font-weight: 700;
}

.header-weather {
    display: flex;
    gap: 10px;
}

.weather-item {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.weather-item:hover {
    background-color: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 15px;
    }

    .header-right {
        flex-direction: column;
        gap: 8px;
    }

    .channel-conditions-label {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 3px;
    }
}

.sync-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 15px;
    margin-right: -5px;
    display: inline-block;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sync-indicator.tooltip::after {
    bottom: auto;
    top: 150%;
    z-index: 1001;
    text-align: center;
}

.sync-indicator.pending {
    background-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
    animation: sync-pulse 1.5s infinite ease-in-out;
}

.sync-indicator.pending.tooltip::after {
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.sync-indicator.synced {
    background-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.sync-indicator.synced.tooltip::after {
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

@keyframes sync-pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
        box-shadow: 0 0 5px #ffa500;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
        box-shadow: 0 0 15px #ffa500;
    }

    100% {
        transform: scale(0.9);
        opacity: 0.7;
        box-shadow: 0 0 5px #ffa500;
    }
}

/* Petitions Page Styles */
.petitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.petitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.petition-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px;
    color: var(--text-primary);
    border-radius: 16px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.petition-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.15);
    background: var(--card-bg-hover);
}

.petition-title {
    font-family: 'Lexend', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #8b5cf6;
    line-height: 1.4;
    font-weight: 700;
}

.petition-background {
    font-size: 1em;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.petition-stats {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 15px;
}

.signature-count {
    font-size: 1.4rem;
    font-weight: 800;
    color: #10b981;
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.signature-label {
    font-size: 0.5em;
    color: var(--text-secondary);
    font-weight: normal;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.petition-status {
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 700;
    color: var(--text-secondary);
}

.petition-link {
    display: block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #8b5cf6;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    transition: all 0.2s ease;
}

.petition-link:hover {
    background: #7c3aed;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
}

.petition-creator {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-style: italic;
}

.petition-response {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    border-left: 3px solid #8b5cf6;
    font-style: italic;
    color: var(--text-secondary);
}

.petition-response strong {
    color: #8b5cf6;
    display: block;
    margin-bottom: 5px;
}

.petition-widget-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.petition-widget-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.widget-petition-action {
    font-size: 0.9em;
    color: var(--text-primary);
    flex: 1;
    text-align: left;
}

.widget-petition-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    line-height: 1.1;
    min-width: 80px;
}

.sig-number {
    font-size: 1.1em;
    font-weight: 800;
    color: #10b981 !important;
}

.sig-label {
    font-size: 0.7em;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 2px;
}

#section-petitions-widget .view-all-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: rgba(139, 92, 246, 0.1);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    transition: all 0.25s ease;
    box-sizing: border-box;
    box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.2);
}

#section-petitions-widget .view-all-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.back-link {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #7c3aed;
    text-decoration: underline;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    margin-left: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

/* Calculator overrides */
#dateFrom, #dateTo {
    width: 100%;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-primary) !important;
    outline: none;
    transition: all 0.2s ease;
}
#dateFrom:focus, #dateTo:focus {
    border-color: rgba(6, 182, 212, 0.5) !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
    background-color: rgba(255, 255, 255, 0.05) !important;
}

#section-calculator button {
    width: 100% !important;
    padding: 12px !important;
    border-radius: 8px !important;
    background-color: rgba(6, 182, 212, 0.1) !important;
    color: #fff !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease-in-out !important;
}
#section-calculator button:hover {
    background-color: rgba(6, 182, 212, 0.2) !important;
    border-color: rgba(6, 182, 212, 0.6) !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    transform: translateY(-1px);
}

/* Custom thin scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
