/* admin-v2 Practice Dashboard, rebuilt from the deck's settled .idband / .setb / .bandhd / .doors / .abil
   rules. Page-only shapes; colours are the shared tokens. Rooted so the global p/h2/button rules lose. */

#akashic-health-records-patient-portal-root .practice-dashboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* .idband */
#akashic-health-records-patient-portal-root .practice-dashboard__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 0 12px;
    margin-bottom: 4px;
    border-bottom: 2px solid var(--primary);
}

#akashic-health-records-patient-portal-root .practice-dashboard__identity {
    min-width: 0;
    flex: 1;
}

#akashic-health-records-patient-portal-root .practice-dashboard__meta {
    margin: 5px 0 0;
    font-size: var(--ak-font-13);
    line-height: 1.5;
    color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .practice-dashboard__meta-short {
    display: none;
}

#akashic-health-records-patient-portal-root .practice-dashboard__summary {
    flex: none;
    text-align: right;
    font-size: var(--ak-font-12-5);
    color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .practice-dashboard__attention {
    display: block;
    font-size: var(--ak-font-15);
    font-weight: 400;
    color: var(--warning);
}

#akashic-health-records-patient-portal-root .practice-dashboard__attention--ok {
    color: var(--sage-ink);
}

#akashic-health-records-patient-portal-root .practice-dashboard__attention--error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--danger);
}

#akashic-health-records-patient-portal-root .practice-dashboard__attention--error svg {
    width: 16px;
    height: 16px;
    flex: none;
}

#akashic-health-records-patient-portal-root .practice-dashboard__working {
    color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .practice-dashboard__checking {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 9rem;
    font-size: var(--ak-font-13);
    color: var(--ink-muted);
}

/* .bandhd */
#akashic-health-records-patient-portal-root .practice-dashboard__band {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

#akashic-health-records-patient-portal-root .practice-dashboard__band-sub {
    font-size: var(--ak-font-12-5);
    letter-spacing: normal;
    text-transform: none;
}

/* Status: capabilities beside a single column of doors. Setup: the doors are a grid under the panel. */
#akashic-health-records-patient-portal-root .practice-dashboard__columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px 24px;
}

#akashic-health-records-patient-portal-root .practice-dashboard__columns .practice-dashboard__band {
    gap: 12px;
}

#akashic-health-records-patient-portal-root .practice-dashboard__doors {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--ak-list-gap);
    align-content: start;
}

@media (min-width: 1024px) {
    #akashic-health-records-patient-portal-root .practice-dashboard__columns {
        grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
    }

    #akashic-health-records-patient-portal-root .practice-dashboard--setup .practice-dashboard__doors {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* .door: the shared card (PracticeDoor); the cell stacks a retry under it. */
#akashic-health-records-patient-portal-root .practice-dashboard__door-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

/* The cell stretches to its grid row; the door fills it, so a wrapped detail does not leave the row ragged. */
#akashic-health-records-patient-portal-root .practice-dashboard__door-cell > .ak-card {
    flex: 1 1 auto;
}

#akashic-health-records-patient-portal-root .practice-dashboard__door-icon {
    display: flex;
    flex: none;
    color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .practice-dashboard__door-icon svg,
#akashic-health-records-patient-portal-root .practice-dashboard__ability-icon svg {
    width: 19px;
    height: 19px;
}

#akashic-health-records-patient-portal-root .practice-dashboard__go {
    flex: none;
}

#akashic-health-records-patient-portal-root .practice-dashboard__manage-retry {
    align-self: flex-start;
}

/* .abil: the shared card; an open capability takes its warning edge, the icon and label its colour. */
#akashic-health-records-patient-portal-root .practice-dashboard__ability {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 104px 15px;
    gap: 12px;
    align-items: start;
    width: 100%;
    text-align: left;
}

#akashic-health-records-patient-portal-root .practice-dashboard__ability-icon {
    display: flex;
    margin-top: 2px;
    color: var(--faint);
}

#akashic-health-records-patient-portal-root .practice-dashboard__ability-status {
    padding-top: 2px;
    font-size: var(--ak-font-12);
    font-weight: 500;
    line-height: 1.5;
    text-align: right;
    color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .practice-dashboard__ability .practice-dashboard__go {
    margin-top: 4px;
}

#akashic-health-records-patient-portal-root .practice-dashboard__ability--working .practice-dashboard__ability-icon {
    color: var(--success);
}

#akashic-health-records-patient-portal-root .practice-dashboard__ability--working .practice-dashboard__ability-status {
    color: var(--sage-ink);
}

#akashic-health-records-patient-portal-root .practice-dashboard__ability--needs-setup .practice-dashboard__ability-icon,
#akashic-health-records-patient-portal-root .practice-dashboard__ability--needs-attention .practice-dashboard__ability-icon,
#akashic-health-records-patient-portal-root .practice-dashboard__ability--needs-setup .practice-dashboard__ability-status,
#akashic-health-records-patient-portal-root .practice-dashboard__ability--needs-attention .practice-dashboard__ability-status {
    color: var(--warning);
}

/* .status-unavailable: the shared error notice, never a healthy or empty practice. */
#akashic-health-records-patient-portal-root .practice-dashboard__unavailable-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--danger);
}

#akashic-health-records-patient-portal-root .practice-dashboard__unavailable-head svg {
    width: 18px;
    height: 18px;
    flex: none;
}

#akashic-health-records-patient-portal-root .practice-dashboard__unavailable-body {
    margin: 13px 0;
    font-size: var(--ak-font-13);
    line-height: 1.5;
    color: var(--ink-muted);
}

/* .setb: the setup guide, a panel card full width above the doors while any required step is open. */
#akashic-health-records-patient-portal-root .practice-setup__head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
}

#akashic-health-records-patient-portal-root .practice-setup__toggle {
    margin-left: auto;
    width: 16px;
    height: 16px;
    color: var(--ink-muted);
    transition: transform 0.2s;
}

#akashic-health-records-patient-portal-root .practice-setup__toggle--open {
    transform: rotate(180deg);
}

#akashic-health-records-patient-portal-root .practice-setup__meter {
    margin-top: 9px;
}

#akashic-health-records-patient-portal-root .practice-setup__next {
    margin-top: 9px;
    font-size: var(--ak-font-13);
    color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .practice-setup__next-step {
    color: var(--ink-strong);
    font-weight: 500;
}

#akashic-health-records-patient-portal-root .practice-setup__choices {
    margin-top: 12px;
}

#akashic-health-records-patient-portal-root .practice-setup__choices + .practice-setup__attest {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
}

#akashic-health-records-patient-portal-root .practice-setup__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

#akashic-health-records-patient-portal-root .practice-setup__steps {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 11px 0 0;
    padding: 0;
    list-style: none;
}

#akashic-health-records-patient-portal-root .practice-setup__step {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: 100%;
    padding: 6px;
    border-radius: 0;
    text-align: left;
    font-size: var(--ak-font-13);
}

#akashic-health-records-patient-portal-root button.practice-setup__step:not(:disabled):hover {
    background: var(--line-soft);
}

#akashic-health-records-patient-portal-root .practice-setup__step:disabled {
    cursor: default;
}

#akashic-health-records-patient-portal-root .practice-setup__marker {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex: none;
    margin-top: 1px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    background: var(--surface);
    font-size: var(--ak-font-10-5);
    font-weight: 600;
    color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .practice-setup__marker--done {
    border-color: var(--green-line);
    background: var(--green-soft);
    color: var(--success);
}

#akashic-health-records-patient-portal-root .practice-setup__marker svg {
    width: 11px;
    height: 11px;
}

#akashic-health-records-patient-portal-root .practice-setup__step-body {
    min-width: 0;
}

#akashic-health-records-patient-portal-root .practice-setup__step-title {
    display: block;
    color: var(--primary);
}

#akashic-health-records-patient-portal-root .practice-setup__step--done .practice-setup__step-title {
    color: var(--ink-muted);
    text-decoration: line-through;
    text-decoration-color: var(--line);
}

#akashic-health-records-patient-portal-root .practice-setup__step-detail {
    display: block;
    margin-top: 1px;
    font-size: var(--ak-font-12-5);
    color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .practice-setup__step--attention .practice-setup__step-detail {
    color: var(--amber-ink);
}

#akashic-health-records-patient-portal-root .practice-setup__later {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid var(--line-soft);
    font-size: var(--ak-font-12);
    color: var(--ink-muted);
}

/* The optional Sandbox row: set off from the required steps, never counted with them. */
#akashic-health-records-patient-portal-root .practice-setup__step--optional {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
}

#akashic-health-records-patient-portal-root .practice-setup__step--optional .practice-setup__step-body {
    flex: 1;
}

#akashic-health-records-patient-portal-root .practice-setup__step--optional .practice-setup__step-title {
    color: var(--ink-strong);
}

/* A set-apart row that is itself the button reads as a link, as the to-do steps do. */
#akashic-health-records-patient-portal-root .practice-setup__step--door .practice-setup__step-title {
    color: var(--primary);
}

#akashic-health-records-patient-portal-root .practice-setup__optional {
    margin-left: 6px;
    font-size: var(--ak-font-11);
    font-weight: 400;
    color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .practice-setup__optional-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

#akashic-health-records-patient-portal-root .practice-setup__optional-error {
    display: block;
    margin-top: 8px;
    font-size: var(--ak-font-12-5);
    color: var(--danger);
}

/* Phone: the verdict replaces the counts line, and the summary column goes (deck #s-dashboard .w-ph). */
@media (max-width: 639px) {
    #akashic-health-records-patient-portal-root .practice-dashboard__header {
        align-items: flex-start;
    }

    #akashic-health-records-patient-portal-root .practice-dashboard__summary {
        display: none;
    }

    #akashic-health-records-patient-portal-root .practice-dashboard__meta--verdict .practice-dashboard__meta-full {
        display: none;
    }

    #akashic-health-records-patient-portal-root .practice-dashboard__meta--verdict .practice-dashboard__meta-short {
        display: inline;
    }

    #akashic-health-records-patient-portal-root .practice-dashboard__ability {
        grid-template-columns: 20px minmax(0, 1fr) 15px;
        gap: 8px;
    }

    #akashic-health-records-patient-portal-root .practice-dashboard__ability-status {
        grid-column: 2;
        grid-row: 2;
        padding: 0;
        text-align: left;
    }

    #akashic-health-records-patient-portal-root .practice-dashboard__ability > .practice-dashboard__go,
    #akashic-health-records-patient-portal-root .practice-dashboard__ability > span:last-child {
        grid-column: 3;
        grid-row: 1;
    }
}

#akashic-health-records-patient-portal-root .practice-setup__altdoor {
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
    font-size: var(--ak-font-13);
    color: var(--ink-muted);
}
#akashic-health-records-patient-portal-root .practice-setup__altdoor b {
    color: var(--ink-strong);
    font-weight: 500;
}
