/* Dashboard and pro area. Builds on the tokens in homepage.css, and borrows the
   availability tags from signup.css. */

.bi-account-hero {
    padding: 48px 0 26px;
    background: linear-gradient(112deg, #063e70 0%, #0a315f 45%, #43164d 100%);
    color: #fff;
}

.bi-account-hero-compact {
    padding: 36px 0 22px;
}

.bi-account-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
}

.bi-account-eyebrow {
    margin: 0 0 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bi-account-lead {
    max-width: 68ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

.bi-account-lead a {
    color: #fff;
    text-decoration: underline;
}

/* ---- panels ---- */

.bi-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.bi-panel {
    padding: 22px 24px;
    border: 1px solid var(--bi-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--bi-shadow);
}

.bi-panel + .bi-panel {
    margin-top: 20px;
}

.bi-panel h2 {
    display: flex;
    gap: 9px;
    align-items: center;
    margin: 0 0 12px;
    color: var(--bi-navy);
    font-size: 1.12rem;
    font-weight: 700;
}

.bi-panel h2 .bi {
    color: var(--bi-blue);
}

.bi-panel-empty {
    margin: 0;
    color: var(--bi-muted);
    font-size: 0.94rem;
}

.bi-panel-figure {
    margin: 0;
    color: var(--bi-navy);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.bi-account-feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 2px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bi-account-feature-list li {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 5px 0;
    font-size: 0.93rem;
}

.bi-account-feature-list .bi {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--bi-blue);
}

/* ---- pro area ---- */

.bi-pro-grid {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.bi-pro-nav {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border: 1px solid var(--bi-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--bi-shadow);
}

.bi-pro-nav-link {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 9px;
    color: var(--bi-ink);
    font-size: 0.94rem;
    text-decoration: none;
}

.bi-pro-nav-link:hover {
    background: #eef4fb;
    color: var(--bi-navy);
}

.bi-pro-nav-link.is-current {
    background: var(--bi-navy);
    color: #fff;
}

.bi-pro-nav-link.is-current .bi {
    color: #fff;
}

.bi-pro-nav-link .bi {
    color: var(--bi-blue);
}

/* Settings sits under the everyday pages, and opens on a settings page */
.bi-pro-nav-settings {
    margin-top: 6px;
    position: relative;
}

.bi-pro-nav-settings::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 12px;
    right: 12px;
    border-top: 1px solid var(--bi-border);
}

.bi-pro-nav-settings.is-open {
    color: var(--bi-navy);
    font-weight: 600;
}

.bi-pro-subnav {
    display: flex;
    flex-direction: column;
    margin: 2px 0 0 24px;
    padding-left: 8px;
    border-left: 2px solid var(--bi-border);
}

.bi-pro-subnav .bi-pro-nav-link {
    padding: 7px 10px;
    font-size: 0.9rem;
}

.bi-pro-soon {
    margin-left: auto;
    padding: 1px 8px;
    border-radius: 999px;
    background: #fdf1dd;
    color: #8a5a10;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.bi-pro-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.bi-pro-card {
    display: block;
    padding: 20px 22px;
    border: 1px solid var(--bi-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--bi-shadow);
    color: var(--bi-ink);
    text-decoration: none;
}

.bi-pro-card:hover {
    border-color: var(--bi-blue);
    color: var(--bi-ink);
}

.bi-pro-card-soon {
    border-style: dashed;
    background: #f7fafd;
}

.bi-pro-card h2 {
    display: flex;
    gap: 9px;
    align-items: center;
    margin: 0 0 8px;
    color: var(--bi-navy);
    font-size: 1.08rem;
    font-weight: 700;
}

.bi-pro-card h2 .bi {
    color: var(--bi-blue);
}

.bi-pro-card p {
    margin: 0 0 10px;
    color: var(--bi-muted);
    font-size: 0.9rem;
}

.bi-pro-card .bi-pro-soon {
    display: inline-block;
    margin-left: 0;
}

/* ---- forms ---- */

.bi-account .form-label {
    font-weight: 700;
}

.bi-account .invalid-feedback {
    display: none;
}

.bi-form-success {
    display: none;
    padding: 10px 14px;
    border: 1px solid #b7e0c6;
    border-radius: 9px;
    background: #eaf7ef;
    color: #1a6b3c;
    font-size: 0.93rem;
}

@media (max-width: 860px) {
    .bi-pro-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .bi-pro-nav {
        flex-flow: row wrap;
    }

}
.bi-account-narrow { max-width: 820px; }

/* ---- account tabs (everyone but pros, who have the pro sidebar) ---- */

.bi-account-tabs {
    border-bottom: 1px solid var(--bi-border);
    background: #fff;
}

.bi-account-tabs .container {
    display: flex;
    gap: 4px;
    overflow-x: auto;
}

.bi-account-tabs a {
    flex: 0 0 auto;
    padding: 12px 14px;
    border-bottom: 2px solid transparent;
    color: #3d4a57;
    text-decoration: none;
    white-space: nowrap;
}

.bi-account-tabs a:hover {
    color: #0a315f;
}

.bi-account-tabs a.is-current {
    border-bottom-color: #0a315f;
    color: #0a315f;
    font-weight: 600;
}

/* the second row, of the settings pages */
.bi-account-subtabs {
    background: #f7f9fc;
}

.bi-account-subtabs a {
    padding: 9px 12px;
    font-size: 0.92rem;
}

/* ---- settings cards ---- */

.bi-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.bi-settings-grid > .bi-settings-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 0;
    color: var(--bi-ink);
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}

.bi-settings-card:hover {
    border-color: var(--bi-blue);
    color: var(--bi-ink);
    transform: translateY(-1px);
}

.bi-settings-card.is-soon {
    opacity: 0.7;
}

.bi-settings-icon {
    display: grid;
    flex: 0 0 42px;
    height: 42px;
    place-items: center;
    border-radius: 11px;
    background: #eef4fb;
    color: var(--bi-blue);
    font-size: 1.2rem;
}

.bi-settings-text strong {
    display: block;
    color: var(--bi-navy);
}

.bi-settings-status {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
    color: #1a6b3c;
    font-size: 0.88rem;
    font-weight: 600;
}

.bi-settings-status.is-missing {
    color: #b7791f;
}

/* ---- the everyday pages along the bottom, on phones ---- */

.bi-tabbar {
    display: none;
}

@media (max-width: 760px) {
    .bi-tabbar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1030;
        display: flex;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        border-top: 1px solid var(--bi-border);
        background: #fff;
        box-shadow: 0 -4px 16px rgba(10, 49, 95, 0.08);
    }

    .bi-tabbar a {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        gap: 2px;
        align-items: center;
        padding: 8px 2px 7px;
        color: var(--bi-muted);
        font-size: 0.72rem;
        text-decoration: none;
    }

    .bi-tabbar a .bi {
        font-size: 1.2rem;
    }

    .bi-tabbar a.is-current {
        color: var(--bi-navy);
        font-weight: 600;
    }

    /* room at the bottom, so the bar never covers the footer */
    body:has(.bi-tabbar) {
        padding-bottom: 64px;
    }

    /* the bar has the everyday pages; the side menu keeps only the settings pages */
    .bi-pro-nav > .bi-pro-nav-link {
        display: none;
    }

    .bi-pro-nav:not(:has(.bi-pro-subnav)) {
        display: none;
    }

    .bi-pro-subnav {
        flex-flow: row wrap;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .bi-account-tabs:not(.bi-account-subtabs) {
        display: none;
    }
}

/* ---- achievements ---- */

.bi-achievement-list {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.bi-achievement-list > li {
    padding: 8px 0;
    border-bottom: 1px solid var(--bi-border);
}

.bi-achievement {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.bi-achievement span {
    overflow-wrap: anywhere;
}

.bi-achievement-list details summary {
    color: #0a4f8f;
    cursor: pointer;
    font-size: 0.9rem;
}

/* ---- pro overview checklist ---- */

.bi-pro-checklist {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bi-pro-checklist li {
    color: #3d4a57;
}

.bi-pro-checklist li.is-done {
    color: #6b7785;
}

.bi-pro-checklist .bi-check-circle-fill {
    color: #1d7a4c;
}

.bi-pro-checklist .bi-circle {
    color: #b0bac4;
}

/* ---- dashboard ---- */

.bi-dash-waiting {
    margin-bottom: 20px;
    border-left: 4px solid #d69e2e;
}

.bi-dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

@media (max-width: 900px) {
    .bi-dash-grid {
        grid-template-columns: 1fr;
    }
}

.bi-dash-main {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.bi-dash-main .bi-panel + .bi-panel {
    margin-top: 0;
}

.bi-dash-partners {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bi-dash-partner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 8px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: inherit;
    text-align: left;
    text-decoration: none;
}

.bi-dash-partner:hover,
.bi-dash-partner:focus-visible {
    background: #eef4fb;
}

.bi-dash-partner-text {
    min-width: 0;
}

.bi-dash-partner-text strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bi-dash-photo {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #e6edf5;
}

.bi-dash-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0a315f;
    font-weight: 700;
    font-size: 0.9rem;
}

/* panels side by side in a grid line up; the stacking margin is for panels in a column */
.bi-account-grid > .bi-panel + .bi-panel {
    margin-top: 0;
}

.bi-dash-includes {
    margin-top: 16px;
}

.bi-dash-includes > summary {
    display: inline-block;
    color: #0a4f8f;
    font-size: 0.9rem;
    cursor: pointer;
}

.bi-dash-includes > summary:hover {
    text-decoration: underline;
}

/* the pro sidebar: the menu, and anything a page puts under it */
.bi-pro-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.bi-pro-aside {
    margin: 0;
    padding: 14px 16px;
}

.bi-pro-aside h2 {
    margin-bottom: 2px;
    font-size: 1rem;
}

.bi-pro-aside .bi-pro-checklist {
    font-size: 0.9rem;
}

/* the welcome questions still unanswered, on the Dashboard */
.bi-dash-welcome {
    margin-bottom: 20px;
    border-left: 4px solid var(--bi-blue);
}

.bi-dash-welcome-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bi-dash-welcome-list a {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--bi-border);
    border-radius: 999px;
    text-decoration: none;
}
