/* ItWorks brand variables */
:root {
    --itw-navy: #0E1B3D;
    --itw-navy-700: #15264F;
    --itw-cyan: #1FA9E1;
    --itw-cyan-600: #0F8DC2;
    --itw-light: #F5F7FA;
    --itw-text: #1A1A1A;
    --itw-muted: #6B7280;

    /* Override Bootstrap primary */
    --bs-primary: var(--itw-cyan);
    --bs-primary-rgb: 31, 169, 225;
    --bs-link-color: var(--itw-cyan-600);
    --bs-link-hover-color: var(--itw-navy);
}

html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    color: var(--itw-text);
    background: #ffffff;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    color: var(--itw-navy);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.btn-primary {
    background-color: var(--itw-cyan);
    border-color: var(--itw-cyan);
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--itw-cyan-600);
    border-color: var(--itw-cyan-600);
}

.btn-outline-primary {
    color: var(--itw-cyan);
    border-color: var(--itw-cyan);
}

.btn-outline-primary:hover {
    background-color: var(--itw-cyan);
    color: #fff;
}

.btn-navy {
    background-color: var(--itw-navy);
    color: #fff;
    border: 1px solid var(--itw-navy);
}

.btn-navy:hover { background-color: var(--itw-navy-700); color: #fff; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--itw-navy) 0%, var(--itw-navy-700) 100%);
    color: #fff;
    padding: 5rem 0 6rem;
    overflow: hidden;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 30%, rgba(31, 169, 225, 0.25), transparent 60%);
    pointer-events: none;
}

.hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.1;
}

.hero .lead { font-size: 1.15rem; color: #d6dcec; max-width: 36rem; }
.hero .accent { color: var(--itw-cyan); }

.hero-logo {
    max-width: 360px;
    width: 100%;
    height: auto;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

/* Cards */
.value-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    background: #fff;
    height: 100%;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.value-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(14, 27, 61, 0.08);
    border-color: var(--itw-cyan);
}

.value-card .icon {
    width: 44px; height: 44px;
    border-radius: 0.5rem;
    background: rgba(31, 169, 225, 0.12);
    color: var(--itw-cyan);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Sections */
section.section { padding: 4rem 0; }
section.section-alt { background: var(--itw-light); }

/* Footer */
.site-footer {
    background: var(--itw-navy);
    color: #cdd5e8;
    padding: 2.5rem 0 2rem;
    margin-top: 3rem;
}
.site-footer a { color: #fff; }
.site-footer .footer-logo { background: #fff; padding: 0.5rem 0.75rem; border-radius: 0.5rem; max-width: 220px; }

/* Top nav */
.itw-navbar {
    background: #ffffff;
    border-bottom: 1px solid #eef0f4;
    position: sticky; top: 0; z-index: 1030;
}
.itw-navbar .navbar-brand img { height: 38px; }
.itw-navbar .nav-link { color: var(--itw-navy); font-weight: 500; }
.itw-navbar .nav-link.active,
.itw-navbar .nav-link:hover { color: var(--itw-cyan); }

/* Forms */
.form-control:focus, .form-select:focus {
    border-color: var(--itw-cyan);
    box-shadow: 0 0 0 .2rem rgba(31, 169, 225, .2);
}

/* Profile photos (About page) */
.profile-photo {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 8px 24px rgba(14, 27, 61, 0.18);
    background: var(--itw-light);
}

@media (min-width: 768px) {
    .profile-photo {
        width: 140px;
        height: 140px;
    }
}

/* Panels (ROI / Chat) */
.panel {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    padding: 1.5rem;
}

.chat-window {
    height: 320px; overflow-y: auto;
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
}

.chat-msg {
    margin-bottom: 0.5rem;
    padding: 0.55rem 0.8rem;
    border-radius: 0.65rem;
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.35;
}
.chat-msg.user { background: var(--itw-cyan); color: #fff; margin-left: auto; border-bottom-right-radius: 0.15rem; }
.chat-msg.bot { background: #fff; color: var(--itw-text); border: 1px solid #e5e7eb; border-bottom-left-radius: 0.15rem; }

/* Error UI from template */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

.blazor-error-boundary { background: #b32121; padding: 1rem 1rem 1rem 3.7rem; color: white; }
.blazor-error-boundary::after { content: "An error has occurred."; }

.darker-border-checkbox.form-check-input { border-color: #929292; }

/* ── Saraland All-Stars 7U Hero ──────────────────────── */
.hero-allstars {
    --as-red: #C8102E;
    --as-red-dark: #A50D24;
    --as-navy: #0E1B3D;
    background: var(--as-red);
    background-image:
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            rgba(255,255,255,0.06) 0deg 10deg,
            transparent 10deg 20deg
        );
    color: #fff;
    padding: 3rem 0 3.5rem;
    position: relative;
    overflow: hidden;
    text-align: center;
    border-bottom: 4px solid var(--as-navy);
}

/* Decorative stars via pseudo-elements */
.hero-allstars__stars::before,
.hero-allstars__stars::after {
    position: absolute;
    font-size: 2.5rem;
    color: var(--as-navy);
    text-shadow:
        0 0 0 var(--as-navy),
        0 0 0 #fff,
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff;
    pointer-events: none;
    z-index: 2;
}
.hero-allstars__stars::before {
    content: "\2605  \2605";
    top: 1rem;
    left: 1.5rem;
}
.hero-allstars__stars::after {
    content: "\2605  \2605";
    top: 1rem;
    right: 1.5rem;
}

.hero-allstars__content {
    position: relative;
    z-index: 3;
}

.hero-allstars__titles {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.hero-allstars__team {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 700;
    font-style: italic;
    color: #fff;
    text-shadow:
        2px 2px 0 var(--as-navy),
        -1px -1px 0 var(--as-navy),
        1px -1px 0 var(--as-navy),
        -1px 1px 0 var(--as-navy),
        3px 3px 0 rgba(0,0,0,0.2);
    line-height: 1;
    letter-spacing: 0.02em;
}

.hero-allstars__sub {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: clamp(1.4rem, 4vw, 2.5rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #fff;
    text-shadow:
        2px 2px 0 var(--as-navy),
        -1px -1px 0 var(--as-navy),
        1px -1px 0 var(--as-navy),
        -1px 1px 0 var(--as-navy);
    line-height: 1.1;
    margin-top: -0.25rem;
}

.hero-allstars__sub strong {
    font-size: 1.15em;
    margin-left: 0.3em;
}

.hero-allstars__tagline {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    margin: 0.75rem 0 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* White wave at bottom */
.hero-allstars__wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 40px;
    background: #fff;
    clip-path: ellipse(55% 100% at 50% 100%);
    z-index: 4;
}

/* ── Finance Tracker ─────────────────────────────────── */
.finance-card {
    border-radius: 0.75rem;
    padding: 1.5rem;
    height: 100%;
    transition: transform .15s ease, box-shadow .15s ease;
}

.finance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(14, 27, 61, 0.08);
}

.finance-card--balance {
    background: linear-gradient(135deg, var(--itw-navy), var(--itw-navy-700));
    color: #fff;
}

.finance-card--balance .finance-card__label { color: #cdd5e8; }
.finance-card--balance .finance-card__value { color: #fff; }

.finance-card--income {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.finance-card--income .finance-card__value { color: #16a34a; }

.finance-card--expense {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.finance-card--expense .finance-card__value { color: #dc2626; }

.finance-card__label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
    color: var(--itw-muted);
}

.finance-card__value {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
}

.finance-card__count {
    font-size: 0.8rem;
    color: var(--itw-muted);
    margin-top: 0.25rem;
}
