/* === Glowbeam dark theme ================================= */

html, body {
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f3f4f6;
    color: #111827;
}

a {
    color: #fb923c;
    text-decoration: none;
}

a:hover {
    color: #fed7aa;
    text-decoration: none;
}

/* Navbar */

.navbar-glow {
    background-color: #000000;
    border-bottom: 1px solid rgba(31, 41, 55, 0.4);
}

.navbar-glow .navbar-brand,
.navbar-glow .nav-link,
.navbar-glow .navbar-text {
    color: #e5e7eb !important;
}

.navbar-glow .nav-link.active,
.navbar-glow .nav-link:hover {
    color: #f97316 !important;
}

/* Main container */

main.container {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Cards */

.card-glow {
    background-color: #ffffff;
    border-radius: 1rem;
    border: 1px solid rgba(209, 213, 219, 0.9);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.card-glow-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

/* Buttons */

.btn-glow-primary {
    background: linear-gradient(135deg, #f97316, #fb923c);
    border: none;
    color: #0f172a;
    border-radius: 999px;
    padding-inline: 1.5rem;
}

.btn-glow-primary:hover {
    filter: brightness(1.05);
    color: #020617;
}

.btn-glow-outline {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: #e5e7eb;
    background: transparent;
}

.btn-glow-outline:hover {
    background-color: rgba(148, 163, 184, 0.12);
    color: #f9fafb;
}

/* Badges */

.badge-glow-verified {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #022c22;
    border-radius: 999px;
}

.badge-glow-pending {
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #422006;
    border-radius: 999px;
}

.badge-glow-comingsoon {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #111827;
    border-radius: 999px;
}

/* Tables */

.table-dark-glow {
    color: #111827;
    border-color: rgba(209, 213, 219, 0.9);
}

.table-dark-glow thead {
    background-color: #f3f4f6;
}

.table-dark-glow tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.table-dark-glow tbody tr:nth-child(odd) {
    background-color: #020617;
}

.table-dark-glow tbody tr:hover {
    background-color: #111827;
}

/* Auth */

.auth-wrapper {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    max-width: 420px;
    width: 100%;
}

/* Logo handling */

.logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.logo-img {
    height: 32px;
    border-radius: 0.5rem;
    display: inline-block;
    vertical-align: middle;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.logo-img:hover {
    transform: translateY(-1px);
}

.logo-dark {
    display: inline-block;
}

.logo-light {
    display: none;
}

body.theme-light .logo-dark {
    display: none;
}

body.theme-light .logo-light {
    display: inline-block;
}

@media (prefers-color-scheme: light) {
    body.auto-theme .logo-dark {
        display: none;
    }
    body.auto-theme .logo-light {
        display: inline-block;
    }
}


/* Footer styling */
.gb-footer {
    background: linear-gradient(180deg, #020617, #000000);
    color: #9ca3af;
}
.gb-footer .link-footer {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    color: #9ca3af;
}
.gb-footer .link-footer:hover {
    color: #f97316;
    text-decoration: none;
}


/* Navbar logo sizing */
.logo-navbar {
    position: relative;
    height: 48px;
    width: auto;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-navbar:hover {
    filter: drop-shadow(0 0 16px rgba(251,146,60,0.7));
    transform: translateY(-1px);
}


/* Hero logo on landing page */
.logo-hero {
    max-width: 260px;
    height: auto;
}


/* Google auth button icon */
.google-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 0.5rem;
}


/* Logo sweep animation on page load */
.logo-navbar::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.0), rgba(255,255,255,0.9), rgba(255,255,255,0.0));
    transform: skewX(-20deg);
    opacity: 0.0;
    pointer-events: none;
    animation: logo-sweep 0.9s ease-out 0.4s forwards;
}

@keyframes logo-sweep {
    0% {
        left: -150%;
        opacity: 0.0;
    }
    30% {
        opacity: 1.0;
    }
    100% {
        left: 220%;
        opacity: 0.0;
    }
}

/* Hero card entrance on dashboard */
.hero-card {
    animation: hero-fade 0.6s ease-out;
    animation-fill-mode: both;
}

@keyframes hero-fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glow buttons for primary actions */
.btn-glow {
    background: linear-gradient(135deg, #f97316, #fb923c);
    border: none;
    color: #0f172a;
    border-radius: 999px;
    padding-inline: 1.6rem;
    box-shadow: 0 0 8px rgba(251,146,60,0.45);
    transition: box-shadow 0.2s ease, transform 0.15s ease, filter 0.15s ease;
}

.btn-glow:hover {
    filter: brightness(1.05);
    box-shadow: 0 0 16px rgba(251,146,60,0.8);
    transform: translateY(-1px);
}

.btn-glow:active {
    transform: translateY(0);
    box-shadow: 0 0 4px rgba(251,146,60,0.6);
}

/* Form field styling */
.form-control {
    border-radius: 0.75rem;
    border-color: #d1d5db;
    box-shadow: inset 0 1px 2px rgba(15,23,42,0.06);
}

.form-control:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 0.18rem rgba(251,146,60,0.30);
}

/* Make labels slightly bolder for readability */
form label {
    font-weight: 500;
    color: #111827;
}

.card-glow-title {
    font-size: 1.4rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.card-glow-subtitle {
    font-size: 0.95rem;
    font-weight: 500;
    color: #4b5563;
}


/* Navbar gradient wordmark next to orb */
.navbar-wordmark {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.9rem;
    background: linear-gradient(90deg, #fbbf24, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 6px rgba(251, 146, 60, 0.4);
    line-height: 1;
}


/* Footer layout & typography */
.footer-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.35rem;
}

.footer-tagline {
    text-transform: uppercase;
    letter-spacing: 0.20em;
    font-size: 0.95rem;
    color: rgba(249, 250, 251, 1.0);
}

.footer-links {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    color: rgba(249, 250, 251, 0.85);
}

.footer-links .link-footer {
    font-size: inherit;
    text-decoration: none;
    color: rgba(249, 250, 251, 0.7);
}

.footer-links .link-footer:hover {
    color: #f97316;
}

.footer-separator {
    margin: 0 0.35rem;
    color: rgba(249, 250, 251, 0.4);
}

.footer-copy {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.62rem;
    color: rgba(148, 163, 184, 0.75);
}

/* Gradient accent for landing + footer tagline (subtle) */
.landing-tagline,
.footer-tagline {
    background: linear-gradient(90deg, #fbbf24, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(251, 146, 60, 0.45);
}


/* Landing page layout */
.landing-page-shell {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-main {
    max-width: 720px;
    margin: 0 auto;
}

.landing-tagline {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 1.9rem;
}

.landing-lead {
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
}

.landing-list {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}



/* Static content page shell */
.page-static-shell {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

@media (max-width: 768px) {
    .page-static-shell {
        padding: 1.5rem 1rem 2.5rem;
    }
}

/* Landing CTA area under hero */
.landing-cta {
    margin-top: 1.5rem;
}
.landing-cta .btn {
    min-width: 180px;
}

/* Reusable Glowbeam pill button */
.gb-btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, #ffb347 0%, #ffcc33 100%);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 0 15px rgba(255, 179, 71, 0.35);
}

.gb-btn:hover {
    box-shadow: 0 0 25px rgba(255, 179, 71, 0.6);
    transform: translateY(-1px);
}


/* Compact nav links for auth area */
.nav-link-compact {
    font-size: 0.9rem;
    padding-inline: 0.5rem;
    opacity: 0.9;
}
.nav-link-compact:hover {
    opacity: 1;
    text-decoration: none;
}


/* Heatmap table + chips */
.heat-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.heat-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
}

.heat-pill .label {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.7rem;
    opacity: 0.7;
}

.heat-pill .value {
    font-weight: 600;
}

.heat-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.heat-cell {
    display: inline-block;
    min-width: 110px;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

.heat-low {
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.18), rgba(76, 175, 80, 0.04));
    border: 1px solid rgba(76, 175, 80, 0.35);
}

.heat-mid {
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.18), rgba(255, 193, 7, 0.04));
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.heat-high {
    background: linear-gradient(90deg, rgba(244, 67, 54, 0.22), rgba(244, 67, 54, 0.06));
    border: 1px solid rgba(244, 67, 54, 0.55);
}

.heat-legend .legend-swatch {
    display: inline-block;
    width: 18px;
    height: 8px;
    border-radius: 999px;
    vertical-align: middle;
    margin-right: 4px;
}

.heat-legend .heat-low {
    border-width: 0;
}
.heat-legend .heat-mid {
    border-width: 0;
}
.heat-legend .heat-high {
    border-width: 0;
}



/* Navbar link styling to match footer */
.navbar-nav .nav-link {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}


/* Heatmap grid (map-style view) */
.heat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.heat-city {
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.heat-city-header {
    padding: 0.6rem 0.9rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.heat-city-name {
    font-weight: 600;
}

.heat-city-meta {
    font-size: 0.8rem;
    opacity: 0.9;
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.heat-city-body {
    padding: 0.5rem 0.9rem 0.7rem;
}

.heat-city-trade {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}

.heat-city-trade .trade-name {
    flex: 1 1 auto;
    padding-right: 0.5rem;
}

.heat-city-trade .trade-metrics {
    flex: 0 0 auto;
    white-space: nowrap;
}

.heatmap-tabs .nav-link {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}




/* Leaflet map container for heatmap */
.heatmap-map-canvas {
    width: 100%;
    min-height: 340px;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

@media (max-width: 768px) {
    .heatmap-map-canvas {
        min-height: 260px;
    }
}


/* Interactive heat-city tiles */
.heat-city {
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.heat-city:hover {
    box-shadow: 0 0 18px rgba(249, 115, 22, 0.35);
    transform: translateY(-1px);
}

.heat-city-active {
    box-shadow: 0 0 22px rgba(249, 115, 22, 0.55);
    border-color: rgba(249, 115, 22, 0.8);
}


/* Heatmap filter bar */
.heatmap-filters {
    gap: 0.75rem;
}

.heatmap-filters .form-select {
    min-width: 150px;
}


/* Heatmap charts layout */
.heatmap-charts canvas {
    max-height: 260px;
}

@media (max-width: 768px) {
    .heatmap-charts canvas {
        max-height: 220px;
    }
}


/* === Heatmap page theming ======================================= */

.heatmap-shell {
    position: relative;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

/* Subtle orange / red ambient glow behind the main card */
.heatmap-shell::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 1.4rem;
    background:
        radial-gradient(circle at 0% 0%, rgba(248, 113, 113, 0.23), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(251, 146, 60, 0.26), transparent 55%);
    opacity: 0.9;
    filter: blur(10px);
    z-index: 0;
}

/* Dark, Glowbeam-flavoured shell for the heatmap content */
.heatmap-card {
    position: relative;
    z-index: 1;
    background:
        radial-gradient(circle at 0% 0%, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.96)),
        linear-gradient(135deg, #020617, #111827);
    color: #e5e7eb;
    border-color: rgba(15, 23, 42, 0.9);
    box-shadow:
        0 22px 45px rgba(15, 23, 42, 0.7),
        0 0 0 1px rgba(15, 23, 42, 0.9);
}

/* Header strip gets a stronger orange/black treatment */
.heatmap-header {
    margin: -0.75rem -0.75rem 1rem;
    padding: 0.95rem 1.25rem;
    background:
        linear-gradient(120deg, rgba(15, 23, 42, 0.98), rgba(24, 24, 27, 0.98)),
        radial-gradient(circle at 100% 0%, rgba(251, 146, 60, 0.16), transparent 55%);
    border-bottom: 1px solid rgba(248, 113, 113, 0.3);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.85);
}

.heatmap-header .card-glow-title {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    font-weight: 700;
    color: #f97316;
}

.heatmap-header .card-glow-subtitle {
    margin-top: 0.15rem;
    font-size: 0.9rem;
    color: #e5e7eb;
}

/* Header subtitle badges */
.heatmap-header .badge {
    border-radius: 999px;
    font-size: 0.7rem;
    padding: 0.35rem 0.7rem;
}

/* Make summary pills pop a little more on the dark card */
.heatmap-card .heat-summary {
    background: radial-gradient(circle at 0% 0%, rgba(248, 113, 113, 0.08), transparent 55%);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(31, 41, 55, 0.85);
}

.heatmap-card .heat-pill {
    background: rgba(15, 23, 42, 0.86);
    border-color: rgba(75, 85, 99, 0.9);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
}

/* Filters strip matches the dark treatment */
.heatmap-card .heatmap-filters {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(24, 24, 27, 0.98));
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.heatmap-card .heatmap-filters .form-select,
.heatmap-card .heatmap-filters .form-control {
    background-color: rgba(15, 23, 42, 0.96);
    border-color: rgba(75, 85, 99, 0.95);
    color: #f9fafb;
}

.heatmap-card .heatmap-filters .form-select:focus,
.heatmap-card .heatmap-filters .form-control:focus {
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.7);
    border-color: rgba(251, 146, 60, 0.95);
}

/* Tabs along the top of the view */
.heatmap-card .heatmap-tabs {
    margin-top: 0.5rem;
}

.heatmap-card .heatmap-tabs .nav-link {
    color: #9ca3af;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding-bottom: 0.55rem;
}

.heatmap-card .heatmap-tabs .nav-link:hover {
    color: #f97316;
}

.heatmap-card .heatmap-tabs .nav-link.active {
    color: #f97316;
    border-bottom-color: #f97316;
}

/* Map container gets a stronger glowing frame */
.heatmap-card .heatmap-map-canvas {
    border-radius: 1rem;
    border: 1px solid rgba(75, 85, 99, 0.9);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 1),
        0 0 32px rgba(248, 113, 113, 0.22);
}

/* City tiles & table take a darker treatment as well */
.heatmap-card .heat-city {
    background: radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 1));
    border-color: rgba(55, 65, 81, 0.95);
}

.heatmap-card .heat-city-header {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(24, 24, 27, 1));
    border-bottom-color: rgba(31, 41, 55, 0.9);
}

.heatmap-card .heat-city:hover {
    box-shadow:
        0 0 24px rgba(248, 113, 113, 0.5),
        0 0 0 1px rgba(248, 113, 113, 0.6);
}

/* Subtle tweak so muted text is still readable on the darker card */
.heatmap-card .text-muted {
    color: #9ca3af !important;
}

/* Charts area */
.heatmap-card .heatmap-charts {
    background: radial-gradient(circle at 100% 0%, rgba(251, 146, 60, 0.08), transparent 55%);
    border-radius: 1rem;
    padding: 1rem;
    border: 1px solid rgba(31, 41, 55, 0.85);
}

.heatmap-card .heatmap-charts canvas {
    background-color: rgba(15, 23, 42, 0.92);
    border-radius: 0.75rem;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .heatmap-card .heatmap-filters {
        border-radius: 1rem;
    }

    .heatmap-header {
        margin: -0.75rem -0.75rem 0.75rem;
    }
}
