.customer-shell {
    --customer-accent: var(--brand-primary, #6326ce);
    --customer-wash: var(--brand-wash, #f3eeff);
    --customer-outline: #d8c9f4;
    --customer-radius: 14px;
    background: var(--canvas);
}

.customer-shell .main-column { min-width: 0; }
.customer-shell main {
    width: min(1180px, 100%);
    margin-inline: auto;
    padding: 36px clamp(18px, 4vw, 54px) 64px;
}

.customer-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 70px;
    padding: 10px max(clamp(18px, 4vw, 54px), calc((100% - 1072px) / 2));
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 5px 20px #1f143407;
}

.customer-brand { display: inline-flex; align-items: center; gap: 10px; }
.customer-brand img { width: 38px; height: 38px; flex: none; }
.customer-brand span { display: grid; gap: 2px; }
.customer-brand strong { font: 800 17px/1.12 Manrope, sans-serif; letter-spacing: -.035em; }
.customer-brand small, .customer-topbar-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.customer-topbar-actions, .customer-topbar nav { display: flex; align-items: center; gap: 6px; }
.customer-topbar-actions { gap: 14px; }
.customer-topbar nav a, .customer-header-signout button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 7px 12px;
    border-radius: 9px;
    color: var(--muted);
    font: 700 13px 'DM Sans', sans-serif;
    white-space: nowrap;
}

.customer-topbar nav a:is(:hover, .active), .customer-header-signout button:hover {
    background: var(--customer-wash);
    color: var(--deep);
}

.customer-header-signout { margin: 0; }
.customer-header-signout button { border: 0; background: #fff; cursor: pointer; }
.customer-shell .footer { background: #fff; }
.customer-shell :is(a, button, input, select, summary):focus-visible {
    outline: 2px solid var(--customer-accent);
    outline-offset: 3px;
}

.customer-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.customer-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    padding: clamp(23px, 4vw, 42px);
    margin-bottom: 31px;
    border-radius: var(--customer-radius);
    color: #fff;
    background: var(--brand-hero, radial-gradient(ellipse at 85% 0%, #291847, #0b1022 74%));
}

.customer-hero .eyebrow { color: var(--brand-highlight, #b0a2ff); margin-bottom: 8px; }
.customer-hero h1, .customer-page-heading h1, .customer-auth-card h1, .customer-action-card h1 {
    font: 850 clamp(29px, 5vw, 41px)/1.12 Manrope, sans-serif;
    letter-spacing: -.04em;
    margin: 0 0 10px;
    overflow-wrap: anywhere;
}

.customer-hero p:not(.eyebrow) { font-size: 15px; line-height: 1.5; color: #e0dbef; margin: 0; }
.customer-account {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(240px, 100%);
    border: 1px solid #ffffff38;
    border-radius: 10px;
    background: #ffffff0d;
    padding: 8px 11px;
}

.customer-account-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eae1ff;
    color: #47218f;
    font: 800 16px Manrope, sans-serif;
}

.customer-account > span:last-child { min-width: 0; }
.customer-account strong, .customer-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-account strong { font-size: 13px; }
.customer-account small { font-size: 11px; color: #d6cde6; margin-top: 2px; }

.customer-section { margin-bottom: 30px; }
.customer-section:last-child { margin-bottom: 0; }
.customer-section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.customer-section-head h2, .mobile-flow-heading h2 { font: 800 22px/1.2 Manrope, sans-serif; letter-spacing: -.03em; margin: 0; }
.customer-section-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.customer-choice-grid, .customer-usage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.customer-choice, .customer-usage-card, .customer-device, .customer-empty,
.customer-auth-card, .mobile-flow-card, .customer-action-card {
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--customer-radius);
}

.customer-choice {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: start;
    gap: 11px;
    padding: 17px;
    box-shadow: 0 4px 15px #23134708;
    transition: border-color .15s ease, background .15s ease;
}

.customer-choice:hover { border-color: #b39ae4; background: #fdfbff; }
.customer-choice-icon, .customer-device-symbol, .customer-action-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--customer-wash);
    color: var(--customer-accent);
    font: 800 24px Manrope, sans-serif;
}

.customer-choice-icon img, .customer-device-symbol img { width: 23px; height: 23px; display: block; }
.customer-choice-windows { background: #eaf2ff; }
.customer-choice-apple { background: #f1f2f7; }
.customer-choice-body { display: grid; gap: 5px; }
.customer-choice-body strong { font: 800 15px/1.3 Manrope, sans-serif; }
.customer-choice-body small { font-size: 13px; line-height: 1.45; color: var(--muted); }
.customer-choice-arrow { color: var(--customer-accent); font-size: 20px; line-height: 1.1; }

.customer-org-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

.customer-org-code strong { font-size: 13px; }
.customer-org-code p { font-size: 12px; color: var(--muted); margin: 3px 0 0; }
.customer-code-actions { display: flex; align-items: center; gap: 7px; min-width: 0; }
.customer-code-actions code {
    padding: 9px 11px;
    border-radius: 7px;
    color: var(--deep);
    background: var(--customer-wash);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.customer-code-actions button, .mobile-secondary-button, .mobile-text-button {
    min-height: 44px;
    padding: 7px 12px;
    border: 1px solid var(--customer-outline);
    border-radius: 8px;
    background: #fff;
    color: var(--deep);
    font: 750 13px 'DM Sans', sans-serif;
    cursor: pointer;
    white-space: nowrap;
}

.customer-code-actions button:hover, .mobile-secondary-button:hover, .mobile-text-button:hover { background: var(--customer-wash); }
.customer-usage-grid { margin-bottom: 12px; }
.customer-usage-card { padding: 15px 17px; }
.customer-usage-card > span { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.customer-usage-card > strong { display: block; margin-top: 6px; font: 850 clamp(21px, 3vw, 29px)/1.2 Manrope, sans-serif; font-variant-numeric: tabular-nums; }
.customer-usage-live { background: var(--customer-wash); border-color: var(--customer-outline); }
.customer-usage-updated { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.customer-usage-updated::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #8d97ae; flex: none; }
.customer-usage-updated[data-available="true"]::before { background: #239858; }
.customer-empty { padding: 17px; }
.customer-empty strong { font-size: 14px; }
.customer-empty p { color: var(--muted); font-size: 13px; margin: 3px 0 0; }

.customer-device-list { display: grid; gap: 8px; }
.customer-device {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto minmax(125px, auto);
    align-items: center;
    gap: 10px 14px;
    padding: 12px 16px;
}

.customer-device-symbol { width: 40px; height: 40px; font-size: 22px; }
.customer-device-name h3 { font: 800 14px Manrope, sans-serif; margin: 0 0 3px; overflow-wrap: anywhere; }
.customer-device-name p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.customer-device-status { justify-self: start; border-radius: 99px; padding: 7px 10px; font-size: 12px; font-weight: 800; background: #edeef4; color: #465168; }
.customer-device-status.is-connected { background: #dff7e7; color: #13653a; }
.customer-device-status.is-connected::before { content: ''; display: inline-block; width: 6px; height: 6px; background: #239858; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.customer-device-status.is-ready { background: var(--customer-wash); color: var(--deep); }
.customer-device-status.is-pending { background: #fff1d1; color: #785208; }
.customer-device-status.is-ended { background: #f5edf0; color: #81485b; }
.customer-device-usage { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px 10px; color: var(--muted); font-size: 12px; }
.customer-device-usage span { white-space: nowrap; }
.customer-device-usage strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.customer-auth-layout, .customer-setup { width: min(100%, 650px); margin-inline: auto; }
.customer-auth-layout { width: min(100%, 480px); }
.customer-back, .customer-secondary-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--deep); font-size: 14px; font-weight: 750; }
.customer-back { margin-bottom: 5px; }
.customer-back:hover, .customer-secondary-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.customer-page-heading { margin: 4px 0 22px; }
.customer-page-heading p, .customer-auth-card > p, .customer-action-card p, .mobile-flow-heading p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
    overflow-wrap: anywhere;
}

.customer-auth-card, .customer-action-card, .mobile-flow-card {
    padding: clamp(18px, 4vw, 32px);
    box-shadow: 0 9px 24px #23134708;
}

.customer-auth-card h1, .customer-action-card h1 { font-size: clamp(25px, 4vw, 33px); }
.customer-auth-card > p + p { margin-top: 12px; }
.customer-auth-card .customer-signin-form { margin-top: 21px; gap: 14px; }
.customer-signin-form label, .mobile-field, .mobile-flow legend { color: var(--ink); font-size: 14px; font-weight: 700; }
.customer-signin-form label small { color: var(--muted); font-size: 12px; font-weight: 500; }
.customer-signin-form input:not([type=checkbox]), .mobile-field :is(input, select) { font-size: 16px; min-height: 47px; border-radius: 8px; }
.customer-signin-form > button, .customer-shell .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    border-radius: 9px;
    padding: 10px 15px;
    background: var(--customer-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    text-align: left;
}

.customer-signin-form > button:hover, .customer-shell .primary-button:hover { background: #5020aa; color: #fff; }
.customer-shell .primary-button:disabled, .mobile-secondary-button:disabled { opacity: .55; cursor: default; }
.customer-shell .primary-button[href] { margin: 0; }
.customer-auth-card > .primary-button[href] { margin-top: 18px; }
.customer-login-links { margin-top: 20px; padding-top: 8px; }
.customer-login-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.customer-auth-card .notice, .customer-auth-card .form-errors:not(:empty), .customer-setup .form-errors:not(:empty) { margin: 14px 0; }
.customer-password-row { display: flex; position: relative; }
.customer-password-row input { padding-right: 78px !important; }
.customer-password-row button {
    position: absolute;
    right: 5px;
    top: 3px;
    bottom: 3px;
    min-height: 0;
    margin: 0;
    padding: 0 12px;
    background: var(--customer-wash);
    color: var(--deep);
}

.customer-password-row button:hover { background: #e9defa; }
.customer-prefilled-org { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 9px; padding: 11px 12px; border-radius: 8px; background: var(--customer-wash); color: var(--deep); font-size: 13px; overflow-wrap: anywhere; }

.customer-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; list-style: none; padding: 0; margin: 0 0 14px; }
.customer-progress li { display: flex; align-items: center; gap: 6px; border-radius: 8px; padding: 8px 9px; background: #edeff5; color: var(--muted); font-size: 12px; font-weight: 750; }
.customer-progress li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #dfe3ed; flex: none; }
.customer-progress li.current { color: var(--deep); background: var(--customer-wash); }
.customer-progress li.current span { color: #fff; background: var(--customer-accent); }
.customer-progress li.complete { color: #17633b; background: #e7f5ec; }
.customer-progress li.complete span { color: #fff; background: #217747; }

.mobile-flow-heading h2 { margin-bottom: 7px; }
.mobile-flow-body { margin: 17px 0 0; }
.mobile-flow-body .primary-button, .mobile-flow-body .mobile-secondary-button { margin: 0 4px 6px 0; }
.mobile-flow fieldset { min-width: 0; margin: 0 0 15px; border: 0; padding: 0; }
.mobile-flow legend { margin-bottom: 8px; }
.mobile-flow .mobile-platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.mobile-flow .mobile-platforms label { min-height: 46px; padding: 10px; }
.mobile-flow .mobile-platforms input { accent-color: var(--customer-accent); }
.mobile-flow .mobile-platforms label span { display: grid; gap: 3px; }
.mobile-flow .mobile-platforms small { color: var(--muted); font-size: 12px; font-weight: 500; }
.mobile-flow .mobile-platforms label:only-of-type,
.mobile-flow .mobile-platforms label:has(+ label[hidden]),
.mobile-flow .mobile-platforms label[hidden] + label { grid-column: 1 / -1; }
.mobile-pending-name { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.mobile-message { min-height: 0; margin: 10px 0 0; font-size: 14px; line-height: 1.45; }
.mobile-message:empty { display: none; }
.mobile-text-button { margin: 0; border: 0; }
.mobile-connect-help ol { padding-left: 22px; margin: 0 0 14px; }
.mobile-connect-help li { padding-left: 4px; margin-bottom: 9px; font-size: 14px; line-height: 1.5; }
.mobile-connect-help li a { color: var(--deep); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.mobile-connect-help p { color: var(--muted); font-size: 13px; margin: 0; }

.customer-action-card .eyebrow { color: var(--deep); font-size: 11px; margin-bottom: 7px; }
.customer-action-icon { margin-bottom: 13px; }
.customer-action-success .customer-action-icon { background: #e4f8ec; color: #176d3f; }
.customer-action-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 17px; }
.customer-pair-device { display: grid; gap: 12px; margin: 15px 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); }
.customer-pair-device dt { font-size: 12px; color: var(--muted); }
.customer-pair-device dd { margin: 3px 0 0; font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.customer-key-details { margin-top: 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); }
.customer-key-details summary { color: var(--deep); font-size: 13px; font-weight: 750; cursor: pointer; }
.customer-key-details code { display: block; margin-top: 11px; overflow-wrap: anywhere; }
.customer-action-card #pairing-local-check { margin: 12px 0 0; }
.customer-action-card #pairing-local-check:empty { display: none; }

@media (max-width: 860px) {
    .customer-choice { grid-template-columns: minmax(0, 1fr) auto; }
    .customer-choice-icon { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .customer-shell main { padding-top: 22px; padding-bottom: 45px; }
    .customer-topbar { flex-wrap: wrap; gap: 4px 14px; }
    .customer-brand img { width: 33px; height: 33px; }
    .customer-brand strong { font-size: 15px; }
    .customer-topbar-actions { width: 100%; justify-content: space-between; }
    .customer-topbar nav a, .customer-header-signout button { min-height: 40px; padding-inline: 10px; }
    .customer-hero { align-items: start; flex-direction: column; margin-bottom: 23px; }
    .customer-choice-grid { grid-template-columns: 1fr; gap: 8px; }
    .customer-choice { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 13px; }
    .customer-choice-icon { grid-column: auto; }
    .customer-usage-grid { gap: 7px; }
    .customer-usage-card { padding: 12px 8px; }
    .customer-usage-card > span { font-size: 11px; }
    .customer-device { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px 10px; padding: 12px; }
    .customer-device-usage { grid-column: 2 / -1; justify-content: start; }
}

@media (max-width: 400px) {
    .customer-status-head, .customer-org-code { align-items: start; flex-direction: column; }
    .customer-device { grid-template-columns: 40px minmax(0, 1fr); }
    .customer-device-status { grid-column: 2; }
    .mobile-mode-fieldset .mobile-platforms { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .customer-choice { transition: none; }
}

.organisation-workspace-entry { min-height: 68px; margin: 0 0 27px; }
.organisation-workspace-entry .customer-choice-arrow { align-self: center; }
.organisation-workspace-nav { background: var(--panel); border-bottom: 1px solid var(--line); }
.organisation-workspace-nav > div {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    width: min(1140px, 100%);
    margin: auto;
    padding: 6px clamp(17px, 4vw, 54px);
}
.organisation-workspace-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 9px;
    color: var(--muted);
    font-weight: 800;
    font-size: 13px;
}
.organisation-workspace-nav a:hover, .organisation-workspace-nav a[aria-current=page] {
    background: var(--brand-wash);
    color: var(--deep);
}

.organisation-shortcuts {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    margin-bottom: 18px;
}
