.workspace-layout,
.login-layout,
.shop-shell {
    --workspace-ink: #17254a;
    --workspace-muted: #52647e;
    --workspace-line: #dce5f1;
    --workspace-forest: #122253;
    --workspace-highlight: #d8e4ff;
    color: var(--workspace-ink);
}

.workspace-layout a:focus-visible,
.workspace-layout button:focus-visible,
.store-bot summary:focus-visible {
    outline: 2px solid #2c5bdc;
    outline-offset: 3px;
}

.workspace-layout {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    min-height: 100vh;
    background: #f3f6fc;
}

.skip-link {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    transform: translateY(calc(-100% - 16px));
    padding: 8px 14px;
    border-radius: 8px;
    background: white;
}

.skip-link:focus {
    transform: none;
}

.workspace-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 36px;
    padding: 32px 20px 22px;
    border-right: 1px solid var(--workspace-line);
    background: #fff;
}

.workspace-brand {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: max-content;
    max-width: 100%;
    color: inherit;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.075em;
    white-space: nowrap;
}

.workspace-brand:hover {
    text-decoration: none;
}

.workspace-brand > span:last-child {
    color: #1748d8;
}

.brand-mark {
    position: relative;
    flex: 0 0 33px;
    height: 33px;
    margin-right: 7px;
    border-radius: 10px;
    overflow: hidden;
    background: #1748d8;
}

.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    left: 8px;
    bottom: 8px;
    width: 17px;
    height: 8px;
    border-radius: 2px 2px 1px 1px;
    background: var(--workspace-highlight);
    transform: skewY(-26deg);
}

.brand-mark::after {
    bottom: 17px;
    opacity: .62;
}

.workspace-nav {
    display: grid;
    gap: 5px;
}

.workspace-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: var(--workspace-muted);
    font-size: 14px;
    white-space: nowrap;
}

.workspace-nav a:hover,
.workspace-nav a[aria-current="page"] {
    color: #1639a8;
    background: #e9efff;
    text-decoration: none;
}

.nav-stores,
.nav-profile {
    position: relative;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.nav-stores {
    background: linear-gradient(currentColor, currentColor) left top / 6px 6px,
                linear-gradient(currentColor, currentColor) right top / 6px 6px,
                linear-gradient(currentColor, currentColor) left bottom / 6px 6px,
                linear-gradient(currentColor, currentColor) right bottom / 6px 6px;
    background-repeat: no-repeat;
    border-radius: 2px;
}

.nav-profile::before,
.nav-profile::after {
    content: "";
    display: block;
    margin: 0 auto;
    border: 1.5px solid currentColor;
}

.nav-profile::before {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.nav-profile::after {
    width: 12px;
    height: 5px;
    margin-top: 2px;
    border-radius: 8px 8px 2px 2px;
}

.workspace-account {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--workspace-line);
}

.account-avatar {
    display: grid;
    flex: 0 0 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: #e9efff;
    color: #23479c;
    font-size: 14px;
    font-weight: 750;
}

.account-details {
    min-width: 0;
}

.account-email {
    display: block;
    color: var(--workspace-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.sign-out,
.sign-out:hover {
    margin: 2px 0 0;
    padding: 3px 0;
    border-radius: 3px;
    color: #23479c;
    background: none;
    box-shadow: none;
    font-size: 13px;
    transform: none;
}

.sign-out:hover {
    text-decoration: underline;
}

.workspace-main {
    width: 100%;
    max-width: 1450px;
    margin: 0 auto;
    padding: clamp(22px, 3.1vw, 52px);
}

.workspace-intro {
    position: relative;
    isolation: isolate;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    min-height: 246px;
    margin-bottom: 24px;
    overflow: hidden;
    padding: clamp(24px, 4vw, 48px);
    border-radius: 23px;
    background-color: var(--workspace-forest);
    background-image: radial-gradient(ellipse at 96% 60%, #29498c, transparent 65%);
    color: #f8faff;
}

.workspace-intro::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 440px;
    height: 440px;
    top: -105px;
    right: -92px;
    opacity: .36;
    border-radius: 50%;
    background: repeating-radial-gradient(circle, transparent 0 20px, #a9bfff 21px, transparent 22px 30px);
    mask-image: linear-gradient(90deg, transparent, black 62%);
}

.workspace-intro h1 {
    margin: 0 0 10px;
    font-size: clamp(32px, 4.1vw, 58px);
    line-height: 1.04;
    letter-spacing: -.065em;
}

.workspace-intro p,
.login-cover p {
    margin: 0;
    color: #d9e3ff;
}

.workspace-intro .add-shop {
    gap: 9px;
    margin-top: 24px;
    padding: 10px 16px;
    color: #183579;
    background: var(--workspace-highlight);
    box-shadow: none;
    font-size: 14px;
}

.workspace-intro .add-shop:hover {
    background: #eaf0ff;
}

.add-shop span {
    font-size: 21px;
    line-height: 1;
}

.workspace-count {
    display: grid;
    justify-items: center;
    flex: 0 0 auto;
    gap: 3px;
    min-width: 162px;
    margin: 0;
    padding: 14px 15px;
    border: 1px solid #a9bfff62;
    border-radius: 15px;
    background: #284489d9;
}

.workspace-count dt {
    color: #d9e3ff;
    font-size: 12px;
}

.workspace-count dd {
    grid-row: 1;
    margin: 0;
    color: var(--workspace-highlight);
    font-size: 48px;
    font-weight: 750;
    line-height: 1.05;
    letter-spacing: -.07em;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 365px), 1fr));
    gap: 18px;
    align-items: start;
}

.store-card {
    min-width: 0;
    padding: clamp(17px, 2vw, 26px);
    border: 1px solid var(--workspace-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 16px #17254a08;
}

.store-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.store-icon {
    position: relative;
    display: block;
    flex: 0 0 43px;
    height: 43px;
    border-radius: 13px;
    background: #e9efff;
    color: #345cbe;
}

.store-icon::before,
.store-icon::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 14px;
    width: 15px;
    height: 13px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
}

.store-icon::after {
    top: 11px;
    height: 7px;
    border-radius: 3px;
    background: #e9efff;
}

.store-heading h2 {
    margin: 1px 0 1px;
    overflow-wrap: anywhere;
    font-size: clamp(19px, 2vw, 25px);
    line-height: 1.17;
    letter-spacing: -.045em;
}

.store-slug,
.store-role,
.store-stats dt {
    font-size: 12px;
    color: var(--workspace-muted);
}

.store-slug {
    overflow-wrap: anywhere;
}

.store-role {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 4px 8px;
    border-radius: 7px;
    background: #edf2f8;
    font-weight: 650;
}

.store-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 19px 0 16px;
}

.store-stats div {
    display: grid;
    flex: 1 1 130px;
    padding: 10px 12px;
    border: 1px solid #edf2f8;
    border-radius: 10px;
    background: #f7f9fd;
}

.store-stats dd {
    grid-row: 1;
    margin: 0 0 1px;
    color: #23479c;
    font-size: 26px;
    font-weight: 750;
    line-height: 1.16;
    letter-spacing: -.05em;
}

.store-primary,
.store-secondary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 12px;
}

.store-primary .button {
    margin: 0;
    min-height: 42px;
    padding: 8px 14px;
    font-size: 14px;
}

.store-secondary {
    margin-top: 12px;
    padding: 2px 0;
    column-gap: 16px;
}

.store-secondary a {
    padding: 3px 0;
    font-size: 13px;
}

.store-bot {
    margin-top: 14px;
    padding-top: 11px;
    border-top: 1px solid var(--workspace-line);
}

.store-bot + .store-bot {
    margin-top: 6px;
}

.store-bot summary {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    list-style: none;
    cursor: pointer;
    color: #23479c;
    font-size: 13px;
    font-weight: 700;
}

.store-bot summary::-webkit-details-marker {
    display: none;
}

.store-bot summary::before {
    flex: 0 0 6px;
    height: 6px;
    margin: -3px 3px 0 1px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    content: "";
}

.store-bot[open] summary::before {
    margin-top: 3px;
    transform: rotate(225deg);
}

.store-bot .status-badge {
    margin-left: auto;
    white-space: normal;
    font-size: 12px;
}

.store-bot .status-badge::before {
    flex: 0 0 6px;
}

.store-bot p {
    margin: 6px 0 0;
    font-size: 13px;
}

.bot-id {
    color: var(--workspace-muted);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.no-stores p {
    margin: 0;
}

.login-page {
    display: flow-root;
    min-height: 100vh;
    background-repeat: no-repeat;
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: stretch;
    max-width: 1000px;
    min-height: 544px;
    margin: clamp(30px, 10vh, 100px) auto;
    padding: 0;
    width: calc(100% - 40px);
    border: 1px solid var(--workspace-line);
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 20px 65px #12225310;
}

.login-cover {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    isolation: isolate;
    overflow: hidden;
    padding: 34px;
    color: #fff;
    background: radial-gradient(at 75% 40%, #29498c, transparent 80%), var(--workspace-forest);
}

.login-cover .workspace-brand > span:last-child {
    color: var(--workspace-highlight);
}

.login-cover p {
    z-index: 1;
    color: #eef3ff;
    font-size: clamp(23px, 3vw, 35px);
    line-height: 1.15;
    letter-spacing: -.045em;
    font-weight: 650;
}

.login-cover-art {
    position: absolute;
    width: 380px;
    height: 210px;
    top: 47%;
    left: 56%;
    transform: translate(-50%, -50%) rotate(-28deg) skew(18deg) scale(.87);
}

.login-cover-art i {
    position: absolute;
    inset: 12px 34px;
    border-radius: 28px;
    border: 1px solid #b7caff76;
    background: linear-gradient(135deg, #baccff2a, #6b8bf515);
}

.login-cover-art i:first-child {
    transform: translate(-34px, 58px);
}

.login-cover-art i:last-child {
    transform: translate(34px, -58px);
    background: linear-gradient(135deg, #d8e4ff6b, #6b8bf540);
}

.login-panel {
    align-self: center;
    padding: clamp(26px, 5.4vw, 66px);
}

.login-panel h1 {
    font-size: clamp(28px, 3.8vw, 43px);
    letter-spacing: -.06em;
}

.login-panel > p {
    margin-bottom: 25px;
}

.login-panel label {
    font-size: 14px;
}

.login-panel input {
    min-height: 48px;
    background: #f8faff;
}

.login-panel button {
    width: 100%;
    min-height: 47px;
    justify-content: space-between;
    margin-top: 23px;
}

@media (max-width: 850px) {
    .workspace-layout {
        display: block;
    }

    .workspace-sidebar {
        position: static;
        display: flex;
        flex-flow: row wrap;
        align-items: center;
        gap: 10px 18px;
        min-height: 0;
        padding: 13px 20px;
        border-right: 0;
        border-bottom: 1px solid var(--workspace-line);
    }

    .workspace-nav {
        display: flex;
    }

    .workspace-nav a {
        padding: 7px 9px;
    }

    .workspace-account {
        margin: 0 0 0 auto;
        padding: 0;
        border: 0;
    }
}

@media (max-width: 600px) {
    .workspace-sidebar {
        gap: 9px 12px;
        padding: 11px 16px;
    }

    .workspace-nav {
        order: 3;
        width: 100%;
        padding-top: 7px;
        border-top: 1px solid var(--workspace-line);
    }

    .workspace-main {
        padding: 16px;
    }

    .workspace-intro {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        margin-bottom: 16px;
        padding: 22px;
        border-radius: 17px;
    }

    .workspace-count {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        gap: 8px;
        min-width: 0;
        padding: 6px 9px;
        border-radius: 9px;
    }

    .workspace-count dd {
        font-size: 18px;
    }

    .store-grid {
        gap: 12px;
    }

    .login-layout {
        width: calc(100% - 32px);
        min-height: 0;
        grid-template-columns: 1fr;
        margin: 22px auto;
    }

    .login-cover {
        padding: 21px;
    }

    .login-cover-art,
    .login-cover p {
        display: none;
    }
}

@media (max-width: 365px) {
    .account-avatar,
    .store-icon {
        display: none;
    }

    .workspace-account {
        flex: 1 1 105px;
        justify-content: flex-end;
    }
}

@media (prefers-reduced-motion: reduce) {
    .workspace-layout .button,
    .login-layout button {
        transition: none;
        transform: none;
    }
}
