/* =========================================================
   CREDITS, PRICING EXTRAS AND DASHBOARD
========================================================= */

/* ---------- navbar pill ---------- */

.credit-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-right: 18px;
    padding: 7px 13px;

    border: 1px solid var(--gp-border-2);
    border-radius: 999px;
    background: var(--gp-bg-soft);

    font-size: 13px;
    font-weight: 700;
    color: var(--gp-navy);
    white-space: nowrap;
    text-decoration: none;

    transition: border-color 0.2s ease, background 0.2s ease;
}

.credit-pill[hidden] {
    display: none;
}

.credit-pill:hover {
    border-color: var(--gp-blue);
    background: var(--gp-bg-tint);
}

.credit-pill.low {
    border-color: #f1b44c;
    background: #fff8e8;
    color: #8a5300;
}

@media (max-width: 850px) {

    /* the menu links are hidden on phones: push the pill next to the
       hamburger button */
    .credit-pill {
        margin: 0 10px 0 auto;
    }
}


/* ---------- out-of-credits dialog ---------- */

.cr-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.cr-modal.open {
    display: flex;
}

.cr-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 33, 74, 0.55);
}

.cr-card {
    position: relative;

    width: 100%;
    max-width: 440px;

    padding: 30px 28px 26px;

    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--gp-shadow-lg);
    text-align: center;
}

.cr-card h2 {
    margin: 0 0 10px;

    font-family: var(--gp-font-heading);
    font-size: 1.25rem;
    color: var(--gp-navy);
}

.cr-card p {
    margin: 0 0 22px;

    line-height: 1.65;
    color: var(--gp-text-2);
}

.cr-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.cr-btn {
    padding: 11px 20px;

    border: 1px solid var(--gp-border-2);
    border-radius: 10px;
    background: #ffffff;

    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--gp-navy);
    text-decoration: none;

    cursor: pointer;
}

.cr-btn.primary {
    border-color: var(--gp-blue);
    background: var(--gp-gradient);
    color: #ffffff;
}


/* ---------- pricing ---------- */

.pricing-grid {
    flex-wrap: wrap;
    gap: 24px;
}

.pricing-grid .price-card {
    flex: 1 1 320px;
}

.price-card .price small {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gp-muted);
}

.price-badge {
    position: absolute;
    top: 18px;
    right: 18px;

    padding: 4px 10px;

    border-radius: 999px;
    background: var(--gp-bg-tint);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--gp-blue-dark);
}

.price-card .primary-btn.is-soon-btn {
    opacity: 0.6;
}

.cost-section {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px 90px;
    text-align: center;
}

.cost-section h2 {
    margin: 0 0 8px;

    font-family: var(--gp-font-heading);
    color: var(--gp-navy);
}

.cost-note {
    margin: 0 0 24px;
    color: var(--gp-muted);
}

.cost-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    text-align: left;
}

.cost-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 12px 16px;

    border: 1px solid var(--gp-border);
    border-radius: 12px;
    background: #ffffff;

    font-size: 0.95rem;
    color: var(--gp-text-2);
}

.cost-item strong {
    flex: none;
    color: var(--gp-blue-dark);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 18px;

    margin-top: 26px;
}

.secondary-link {
    font-weight: 700;
    color: var(--gp-blue-dark);
}


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

.dash {
    max-width: 1060px;
    margin: 0 auto;
    padding: 48px 24px 90px;
}

.dash-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 22px;
}

.dash-head h1 {
    margin: 6px 0 4px;

    font-family: var(--gp-font-heading);
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    color: var(--gp-navy);
}

.dash-sub {
    margin: 0;
    color: var(--gp-muted);
    word-break: break-word;
}

.dash-logout {
    padding: 9px 16px;

    border: 1px solid var(--gp-border-2);
    border-radius: 10px;

    font-size: 14px;
    font-weight: 700;
    color: var(--gp-navy);
    text-decoration: none;
}

.dash-logout:hover {
    border-color: var(--gp-blue);
    background: var(--gp-bg-tint);
}

.dash-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 18px;

    margin-bottom: 18px;
}

.dash-grid.dash-two {
    grid-template-columns: 1fr 1fr;
}

.dash-card {
    padding: 22px 24px;

    border: 1px solid var(--gp-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--gp-shadow);
}

.dash-wide {
    margin-bottom: 18px;
}

.dash-card h2 {
    margin: 0 0 14px;

    font-family: var(--gp-font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gp-muted-2);
}

.dash-card h2 small {
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.dash-big {
    font-family: var(--gp-font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--gp-navy);
}

.dash-big small {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gp-muted);
}

.dash-meter {
    height: 10px;
    margin: 16px 0 10px;

    border-radius: 999px;
    background: var(--gp-bg-tint);
    overflow: hidden;
}

.dash-meter span {
    display: block;
    height: 100%;

    border-radius: 999px;
    background: var(--gp-gradient);
}

.dash-note {
    margin: 0 0 12px;

    font-size: 0.92rem;
    color: var(--gp-muted);
}

.dash-plan {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;

    margin-bottom: 10px;
}

.dash-plan .dash-note {
    margin: 0;
}

.dash-chip {
    padding: 5px 14px;

    border-radius: 999px;
    background: var(--gp-bg-tint);

    font-size: 0.9rem;
    font-weight: 800;
    color: var(--gp-blue-dark);
}

.dash-chip.pro {
    background: var(--gp-gradient);
    color: #ffffff;
}

.dash-btn {
    display: inline-block;
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;

    margin: 0;
}

.dash-stats div {
    text-align: center;
}

.dash-stats dt {
    font-size: 0.78rem;
    color: var(--gp-muted);
}

.dash-stats dd {
    margin: 4px 0 0;

    font-family: var(--gp-font-heading);
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--gp-navy);
}

.dash-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 150px;
}

.dash-bar {
    position: relative;

    flex: 1;
    height: 100%;
    padding-bottom: 22px;

    display: flex;
    align-items: flex-end;
}

.dash-bar-fill {
    display: block;
    width: 100%;
    min-height: 3px;

    border-radius: 6px 6px 2px 2px;
    background: var(--gp-gradient);
}

.dash-bar-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    text-align: center;
    font-size: 11px;
    color: var(--gp-muted-2);
}

.dash-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dash-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    padding: 11px 0;

    border-bottom: 1px solid var(--gp-border);

    font-size: 0.95rem;
    color: var(--gp-text-2);
}

.dash-list li:last-child {
    border-bottom: 0;
}

.dash-list strong {
    flex: none;
    color: var(--gp-navy);
}

.dash-list small {
    font-weight: 500;
    color: var(--gp-muted);
}

.dash-when {
    display: block;
    margin-top: 2px;

    font-size: 0.78rem;
    color: var(--gp-muted-2);
}

.dash-empty {
    margin: 0;
    color: var(--gp-muted);
}

.dash-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-items: end;
}

.dash-form label {
    display: grid;
    gap: 6px;

    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gp-text-2);
}

.dash-form input {
    padding: 11px 13px;

    border: 1px solid var(--gp-border-2);
    border-radius: 10px;

    font: inherit;
}

.dash-form button {
    grid-column: 1 / -1;
    justify-self: start;
}

@media (max-width: 860px) {

    .dash-grid,
    .dash-grid.dash-two,
    .dash-form {
        grid-template-columns: 1fr;
    }

    .dash-bars {
        gap: 4px;
    }
}


/* ---------- upgrade / payments ---------- */

.flash.info {
    border-color: var(--gp-border-2);
    background: var(--gp-bg-tint);
    color: var(--gp-navy);
}

.upgrade-card {
    max-width: 560px;
}

.upgrade-summary {
    display: grid;
    gap: 10px;

    margin: 0 0 18px;
}

.upgrade-summary div {
    display: flex;
    justify-content: space-between;
    gap: 16px;

    padding: 11px 0;

    border-bottom: 1px solid var(--gp-border);
}

.upgrade-summary dt {
    color: var(--gp-muted);
}

.upgrade-summary dd {
    margin: 0;

    font-weight: 700;
    color: var(--gp-navy);
}

.upgrade-pay {
    width: 100%;
    margin: 6px 0 14px;
}

.upgrade-pay:disabled {
    opacity: 0.7;
    cursor: wait;
}

.upgrade-note {
    margin: 0 0 14px;

    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--gp-muted);
}

.dash-link {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--gp-blue-dark);
}


/* ---------- logout button (a form button that looks like the old link) ---------- */

.dash-logout-form {
    margin: 0;
}

button.dash-logout {
    background: #ffffff;
    font-family: inherit;
    cursor: pointer;
}


/* ---------- e-mail verification ---------- */

.dash-verify {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 18px;
    padding: 18px 22px;

    border: 1px solid #f1b44c;
    border-radius: 16px;
    background: #fff8e8;
    color: #5c3a00;
}

.dash-verify p {
    margin: 4px 0 0;
    font-size: 0.93rem;
    line-height: 1.55;
    word-break: break-word;
}

.dash-verify form {
    margin: 0;
}

.dash-verified {
    margin-left: 6px;
    padding: 2px 8px;

    border-radius: 999px;
    background: #e8f7ee;

    font-size: 0.78rem;
    font-weight: 700;
    color: #17703a;
}


/* ---------- delete account ---------- */

.dash-danger {
    border-color: #f0b8b3;
}

.dash-danger h2 {
    color: #b42318;
}

.dash-danger .dash-form {
    grid-template-columns: 1fr 1fr;
}

.primary-btn.danger-btn {
    background: #b42318;
    border-color: #b42318;
}

@media (max-width: 860px) {

    .dash-danger .dash-form {
        grid-template-columns: 1fr;
    }
}
