.pa-studio-plan-bar {
    align-items: center;
    background:
        linear-gradient(100deg, rgba(7, 95, 108, .1), rgba(255, 255, 255, .96) 52%),
        #fff;
    border: 1px solid rgba(11, 112, 126, .24);
    border-radius: 8px;
    color: #17314a;
    display: flex;
    font-size: .78rem;
    gap: .9rem;
    justify-content: space-between;
    margin: .65rem .75rem;
    min-height: 2.6rem;
    padding: .48rem .72rem;
}

.pa-studio-plan-bar__status,
.pa-studio-plan-bar__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.pa-studio-plan-bar__status strong {
    color: #006d78;
    letter-spacing: .02em;
}

.pa-studio-plan-bar__status span {
    border-left: 1px solid rgba(23, 49, 74, .2);
    color: #5d7186;
    padding-left: .55rem;
}

.pa-studio-plan-bar a,
.pa-studio-inline-help a {
    color: #006d78;
    font-weight: 750;
    text-underline-offset: .14em;
}

.pa-workspace-top-actions > .pa-studio-plan-bar {
    flex: 0 0 auto;
    gap: .42rem;
    margin: 0;
    min-height: 2.25rem;
    padding: .22rem .45rem;
    white-space: nowrap;
}

.pa-workspace-top-actions > .pa-studio-plan-bar .pa-studio-plan-bar__status,
.pa-workspace-top-actions > .pa-studio-plan-bar .pa-studio-plan-bar__actions {
    display: flex;
    width: auto;
    height: auto;
    margin-right: 0;
    border-radius: 0;
    background: none;
    flex-wrap: nowrap;
    gap: .35rem;
}

.pa-workspace-top-actions > .pa-studio-plan-bar .pa-studio-plan-bar__status {
    font-size: .66rem;
}

.pa-workspace-top-actions > .pa-studio-plan-bar .pa-studio-plan-bar__status span {
    display: inline;
    width: auto;
    height: auto;
    margin-right: 0;
    border-radius: 0;
    background: none;
    color: #5d7186;
}

.pa-workspace-top-actions > .pa-studio-plan-bar .pa-studio-plan-bar__actions a {
    min-width: auto;
    height: 1.8rem;
    padding: 0 .35rem;
    font-size: .65rem;
}

.pa-studio-access-badge {
    display: none !important;
}

.pa-studio-access-badge[data-state="locked"] {
    background: #f3f5f7;
    border-color: #c8d0d8;
    color: #485d70;
}

.pa-studio-access-badge[data-state="credit-ready"] {
    background: #fff7d8;
    border-color: #d8bd5d;
    color: #6f5700;
}

.pa-studio-access-control--locked {
    cursor: not-allowed !important;
    opacity: .72;
}

.pa-studio-access-control--locked:hover {
    opacity: .9;
}

.pa-studio-inline-help {
    background: #eef8f8;
    border-left: .22rem solid #168994;
    color: #3d566b;
    font-size: .78rem;
    line-height: 1.45;
    margin: .4rem 0 .7rem;
    padding: .55rem .65rem;
}

.pa-studio-access-dialog {
    background: transparent;
    border: 0;
    color: #17314a;
    max-width: min(31rem, calc(100vw - 2rem));
    padding: 0;
    width: 100%;
    z-index: 2147483500;
}

.pa-studio-access-dialog::backdrop {
    background: rgba(3, 19, 31, .72);
    backdrop-filter: blur(3px);
}

.pa-studio-access-dialog__surface {
    background:
        linear-gradient(140deg, rgba(24, 143, 153, .1), transparent 42%),
        #fbfcfd;
    border: 1px solid rgba(162, 184, 199, .7);
    border-radius: 8px;
    box-shadow: 0 1.6rem 5rem rgba(0, 17, 29, .35);
    padding: 1.35rem;
}

.pa-studio-access-dialog__eyebrow {
    color: #087681;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .14em;
    margin-bottom: .4rem;
}

.pa-studio-access-dialog h2 {
    font-family: "Aptos Display", "Segoe UI", sans-serif;
    font-size: 1.45rem;
    margin: 0 0 .55rem;
}

.pa-studio-access-dialog p {
    line-height: 1.5;
}

.pa-studio-access-dialog__facts {
    background: #edf3f5;
    border-radius: 8px;
    display: grid;
    gap: .65rem;
    margin: 1rem 0;
    padding: .8rem;
}

.pa-studio-access-dialog__facts div {
    display: grid;
    gap: .14rem;
    grid-template-columns: 6.2rem 1fr;
}

.pa-studio-access-dialog__facts dt {
    color: #63788a;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.pa-studio-access-dialog__facts dd {
    font-weight: 750;
    margin: 0;
}

.pa-studio-access-dialog__note {
    color: #50677a;
    font-size: .82rem;
}

.pa-studio-access-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.pa-studio-access-dialog__actions a,
.pa-studio-access-dialog__actions button {
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: .68rem .9rem;
    pointer-events: auto;
    text-decoration: none;
    touch-action: manipulation;
}

.pa-studio-access-dialog__primary {
    background: #006d78;
    border: 1px solid #006d78;
    color: #fff;
}

.pa-studio-access-dialog__secondary {
    background: #fff;
    border: 1px solid #9dafbd;
    color: #273f53;
}

.pa-studio-access-dialog__actions button:disabled {
    background: #e5ebee;
    border-color: #c6d1d7;
    color: #526875;
    cursor: not-allowed;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__actions button:disabled {
    background: #152935;
    border-color: #29434c;
    color: #9fb4bc;
}

@media (max-width: 720px) {
    .pa-studio-plan-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .pa-studio-plan-bar__actions {
        width: 100%;
    }

    .pa-studio-plan-bar__actions a {
        flex: 1 1 auto;
    }

    .pa-studio-access-dialog__actions > * {
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 1280px) {
    .pa-studio-workspace-shell .pa-workspace-top-actions > .pa-studio-plan-bar {
        display: flex !important;
        padding: .15rem .25rem;
        min-width: 0;
    }

    .pa-workspace-top-actions > .pa-studio-plan-bar .pa-studio-plan-bar__status {
        display: none;
    }

    .pa-workspace-top-actions > .pa-studio-plan-bar .pa-studio-plan-bar__actions a {
        white-space: normal;
        line-height: 1.15;
        font-size: .75rem;
        min-height: 40px;
        max-width: 8.5rem;
        height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pa-studio-access-dialog::backdrop {
        backdrop-filter: none;
    }
}

/* Dark-only final authority for the deferred access dialog. This sheet is
   emitted after theme-dark.css, so every painted dialog layer owns an exact
   canonical role instead of compositing the Light surface underneath it. */
html[data-pa-theme="dark"] .pa-studio-access-dialog {
    background: #081620;
    background-image: none;
    color: #F1F8F9;
    box-shadow: none;
    filter: none;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog::backdrop {
    background: #081620;
    background-image: none;
    backdrop-filter: none;
    filter: none;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__surface {
    background: #152935;
    background-image: none;
    border-color: #29434C;
    box-shadow: none;
    filter: none;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__eyebrow {
    color: #70E1DC;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog h2,
html[data-pa-theme="dark"] .pa-studio-access-dialog__facts dd {
    color: #F1F8F9;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog p,
html[data-pa-theme="dark"] .pa-studio-access-dialog__note {
    color: #C7D4D9;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__facts {
    background: #183240;
    background-image: none;
    border: 1px solid #29434C;
    box-shadow: none;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__facts dt {
    color: #8298A2;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__primary {
    background: #28B8C4;
    background-image: none;
    border-color: #28B8C4;
    color: #081620;
    box-shadow: none;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__secondary {
    background: #203E4D;
    background-image: none;
    border-color: #29434C;
    color: #F1F8F9;
    box-shadow: none;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__actions :is(a, button):focus-visible {
    outline: 2px solid #70E1DC;
    outline-offset: 2px;
    box-shadow: none;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__surface > .pa-workspace-center-evidence {
    border-color: #70E1DC;
    background: #081620;
    background-image: none;
    color: #F1F8F9;
    box-shadow: none;
    backdrop-filter: none;
    filter: none;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__surface > .pa-workspace-center-evidence > span {
    color: #70E1DC !important;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__surface > .pa-workspace-center-evidence > strong {
    color: #F1F8F9 !important;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__surface > .pa-workspace-center-evidence > p {
    color: #C7D4D9 !important;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__surface > .pa-workspace-center-evidence > small {
    border-top-color: #29434C;
    color: #8298A2 !important;
}

html[data-pa-theme="dark"] .pa-studio-access-dialog__surface.has-center-reaction {
    box-shadow: none !important;
    filter: none !important;
    animation: none !important;
}
