.card-body {
    padding-top: 0px;
}

.design {
    width: 90%;
    max-width: 500px;
    text-align: left;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
}

.button {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 32%;
    resize: horizontal;
}

/* ── card-status section spacing ── */
.card-status {
    padding-top: 4px;
}

.card-status .input-group {
    margin-top: 6px;
}

.card-status p {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 0;
}

.card-status h6 {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 16px;
    margin-bottom: 6px;
}

.card-status h3 {
    font-size: 14px;
    margin-top: 14px;
}

/* status colour overrides */
.card-status [style*="color: #00aa00"],
#\*-status {
    color: var(--green) !important;
}

/* ───────────────────────────────────────────
   Provider sidebar + detail panel layout
─────────────────────────────────────────── */

.provider-layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* ── Sidebar (list of providers) ── */
.provider-sidebar {
    flex: 0 0 300px;
    width: 300px;
}

.provider-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    position: sticky;
    top: 70px;
}

.provider-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 9px 12px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.provider-nav-item:hover {
    background: var(--surface2);
    color: var(--text);
}

.provider-nav-item.active {
    background: var(--surface2);
    border-color: var(--border);
    color: var(--text);
    box-shadow: inset 3px 0 0 var(--accent);
}

.provider-nav-item.provider-nav-settings {
    margin-top: 8px;
}

.provider-nav-label {
    white-space: normal;
    overflow-wrap: break-word;
}

.provider-nav-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: var(--muted);
}

.provider-nav-dot-neutral {
    background: var(--muted);
}

/* ── Detail panel (right side, one active provider card) ── */
.provider-panel {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    align-self: stretch;
    box-sizing: border-box;
}

.provider-panel .provider-card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 14px 0 !important;
    box-sizing: border-box;
}

/* Docs-style app-shell chrome — only enabled on large screens (see below) */
.provider-sidebar-header,
.provider-panel-topbar {
    display: none;
}

/* ── Mobile overlay FAB + backdrop (hidden unless mobile, see media query) ── */
.provider-mobile-fab {
    display: none;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg);
    border: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.provider-mobile-fab-arrow {
    display: inline-block;
    transition: transform 0.2s;
}

.provider-sidebar.nav-open .provider-mobile-fab-arrow {
    transform: rotate(180deg);
}

.provider-nav-backdrop {
    display: none;
}

/* ── Mobile: sidebar becomes a horizontally scrollable tab bar above the panel ── */
@media (max-width: 800px) {
    .provider-layout {
        flex-direction: column;
    }

    .provider-sidebar {
        width: 100%;
        flex: none;
    }

    .provider-mobile-fab {
        display: flex;
        position: fixed;
        right: 20px;
        bottom: 40px;
        z-index: 60;
    }

    .provider-nav-backdrop {
        display: none;
    }

    .provider-sidebar.nav-open .provider-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 50;
    }

    .provider-panel {
        width: 100%;
        flex-basis: auto;
    }

    .provider-nav {
        display: none;
        flex-direction: column;
        position: fixed;
        top: auto;
        left: 16px;
        right: 16px;
        bottom: 16px;
        z-index: 55;
        max-height: 70vh;
        overflow-y: auto;
        gap: 4px;
        border-radius: 16px;
        padding: 12px;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
    }

    .provider-sidebar.nav-open .provider-nav {
        display: flex;
    }

    .provider-nav-item {
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
    }

    .provider-nav-label {
        white-space: normal;
        overflow-wrap: break-word;
        text-align: left;
    }

    .provider-nav-item.active {
        box-shadow: inset 3px 0 0 var(--accent);
    }

    .provider-nav-item.provider-nav-settings {
        margin-top: 4px;
    }
}

/* ───────────────────────────────────────────
   Large screens: docs-style app shell
   (sticky, fixed-height row; sidebar and
   content panel scroll independently)
─────────────────────────────────────────── */
@media (min-width: 801px) {
    .provider-layout {
        position: sticky;
        top: 62px;
        height: calc(100vh - 140px);
        min-height: 420px;
    }

    /* ── Sidebar becomes one bordered box: header + scrollable nav ── */
    .provider-sidebar {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 8px;
    }

    .provider-sidebar-header {
        display: block;
        padding: 12px 16px;
        font-family: var(--mono);
        font-size: 11px;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.08em;
        background: var(--surface2);
        border-bottom: 1px solid var(--border);
        border-radius: 8px 8px 0 0;
        flex-shrink: 0;
    }

    .provider-nav {
        flex: 1;
        overflow-y: auto;
        position: static;
        top: auto;
        background: transparent;
        border: none;
        border-radius: 0;
    }

    /* ── Panel becomes one bordered box: topbar + scrollable body ── */
    .provider-panel {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 8px;
    }

    .provider-panel-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 20px;
        border-bottom: 1px solid var(--border);
        background: var(--surface2);
        border-radius: 8px 8px 0 0;
        font-family: var(--mono);
        font-size: 11px;
        color: var(--muted);
        flex-shrink: 0;
    }

    .provider-panel-current {
        color: var(--accent);
    }

    .provider-panel-spacer {
        flex: 1;
    }

    .provider-panel-body {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
    }

    /* Cards sit "loose" inside the already-bordered panel — */
    /* the inner header is redundant with the topbar, so drop it */
    /* and let the body content fill the panel directly.       */
    .provider-panel-body .provider-card.card.design {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .provider-panel-body .card-header {
        display: none;
    }

    .provider-panel-body .card-body {
        padding: 0;
    }
}