body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f7f8fa;
    color: #1f2933;
}

.workspace-shell {
    display: flex;
    min-height: 100vh;
}

.workspace-sidebar {
    background: #ffffff;
    border-right: 1px solid #d9e2ec;
    display: flex;
    flex-direction: column;
    flex: 0 0 248px;
    height: 100vh;
    overflow: hidden;
    position: sticky;
    top: 0;
}

.workspace-brand {
    align-items: center;
    border-bottom: 1px solid #d9e2ec;
    display: flex;
    gap: 10px;
    min-height: 64px;
    padding: 14px 16px;
}

.workspace-brand-icon {
    align-items: center;
    background: #1f2933;
    border-radius: 8px;
    color: #ffffff;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.workspace-brand strong,
.workspace-brand span {
    display: block;
}

.workspace-brand span {
    color: #52616b;
    font-size: 12px;
    margin-top: 2px;
}

.workspace-nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 10px;
}

.workspace-nav-link {
    align-items: center;
    border-radius: 6px;
    color: #1f2933;
    display: flex;
    gap: 7px;
    min-height: 34px;
    padding: 5px 8px;
    text-decoration: none;
}

.workspace-nav-link:hover,
.workspace-nav-link.active {
    background: #eef2f7;
    font-weight: 700;
}

.workspace-nav-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 18px;
    justify-content: center;
}

.admin-icon {
    display: inline-block;
    flex: 0 0 auto;
    height: 16px;
    width: 16px;
}

.workspace-brand-icon .admin-icon {
    height: 20px;
    width: 20px;
}

.workspace-tab-icon {
    height: 15px;
    width: 15px;
}

.workspace-account-area {
    background: #ffffff;
    border-top: 1px solid #d9e2ec;
    flex: 0 0 auto;
    padding: 10px;
}

.workspace-account-profile,
.workspace-account-action {
    align-items: center;
    color: #1f2933;
    display: flex;
    gap: 7px;
    text-decoration: none;
}

.workspace-account-profile {
    border-radius: 6px;
    font-weight: 600;
    min-height: 34px;
    padding: 5px 8px;
}

.workspace-account-profile:hover {
    background: #eef2f7;
}

.workspace-account-actions {
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
    margin-top: 6px;
}

.workspace-account-actions form {
    margin: 0;
}

.workspace-account-action {
    background: transparent;
    border: 1px solid #d9e2ec;
    border-radius: 6px;
    box-sizing: border-box;
    font: inherit;
    justify-content: center;
    min-height: 32px;
    padding: 5px 7px;
    width: 100%;
}

.workspace-account-action:hover {
    background: #eef2f7;
    border-color: #9fb3c8;
}

.workspace-logout {
    padding: 0;
}

.workspace-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.workspace-tabs {
    align-items: stretch;
    background: #ffffff;
    border-bottom: 1px solid #d9e2ec;
    display: flex;
    gap: 6px;
    min-height: 48px;
    overflow-x: auto;
    padding: 8px 16px 0;
    white-space: nowrap;
}

.workspace-tab {
    align-items: center;
    background: #f7f8fa;
    border: 1px solid #d9e2ec;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    display: flex;
    gap: 4px;
    max-width: 240px;
    min-width: 120px;
}

.workspace-tab.active {
    background: #ffffff;
    border-color: #9fb3c8;
    font-weight: 700;
}

.workspace-tab a {
    align-items: center;
    color: #1f2933;
    display: flex;
    flex: 1;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    padding: 10px 8px 9px 10px;
    text-decoration: none;
    text-overflow: ellipsis;
}

.workspace-tab button {
    background: transparent;
    border: 0;
    color: #52616b;
    padding: 8px;
}

.workspace-content {
    flex: 1;
    margin: 0 auto;
    max-width: 1280px;
    overflow: auto;
    padding: 24px;
    width: calc(100% - 48px);
}

.standalone-page {
    margin: 48px auto;
    max-width: 520px;
    padding: 0 24px;
}

.sr-only {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.panel,
.login-form {
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 14px;
}

input {
    display: block;
    width: 100%;
    max-width: 360px;
    padding: 8px 10px;
    margin-top: 6px;
}

button {
    padding: 8px 14px;
    border: 1px solid #1f2933;
    background: #1f2933;
    color: #ffffff;
    border-radius: 6px;
}

.link-button {
    background: transparent;
    border: 0;
    color: #1f2933;
    cursor: pointer;
    padding: 0 0 0 8px;
    text-decoration: underline;
}

.button-link {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #1f2933;
    background: #1f2933;
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
}

.button-link.secondary {
    background: #ffffff;
    color: #1f2933;
}

.form-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.modal-dialog {
    border: 0;
    margin: 24px auto;
    max-width: 760px;
    padding: 0;
    position: relative;
    width: min(100%, 760px);
}

.modal-dialog.wide {
    max-width: 1120px;
    width: min(100%, 1120px);
}

.danger-zone {
    border: 1px solid #fca5a5;
    border-radius: 8px;
    margin-top: 16px;
    padding: 12px;
}

.danger-zone summary {
    color: #7f1d1d;
    cursor: pointer;
    font-weight: 700;
}

.modal-host {
    border: 0;
    border-radius: 8px;
    padding: 0;
    width: min(92vw, 1180px);
}

.modal-host-panel {
    max-height: min(88vh, 900px);
    overflow: auto;
    padding: 20px;
}

.modal-host-content .modal-dialog {
    margin: 0;
    width: 100%;
}

.confirm-dialog {
    border: 0;
    border-radius: 8px;
    max-width: 520px;
    padding: 0;
    width: min(92vw, 520px);
}

.confirm-dialog form {
    padding: 20px;
}

.modal-host::backdrop,
.modal-dialog::backdrop,
.confirm-dialog::backdrop {
    background: rgba(15, 23, 42, .48);
}

.modal-host-close {
    position: absolute;
    right: 12px;
    top: 10px;
    z-index: 2;
}

select {
    display: block;
    width: 100%;
    max-width: 520px;
    padding: 8px 10px;
    margin-top: 6px;
}

.test-input {
    margin-bottom: 18px;
}

.nested {
    margin: 1rem 0;
}

.notice {
    border-radius: 6px;
    margin: 1rem 0;
    padding: .75rem;
}

.notice.success {
    background: #ecfdf3;
    border: 1px solid #86efac;
    color: #14532d;
}

.notice.error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #7f1d1d;
}

.checkbox {
    align-items: center;
    display: flex;
    gap: .5rem;
}

.error {
    color: #b42318;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    border-bottom: 1px solid #d9e2ec;
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f7f8fa;
    font-weight: 600;
}

.details {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 8px 16px;
}

.details dt {
    font-weight: 600;
}

.details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

.filters label {
    margin-bottom: 0;
}

.filters input {
    width: 180px;
}

.muted {
    color: #52616b;
}

.dashboard-grid,
.metric-grid {
    display: grid;
    gap: 12px;
}

.dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-bottom: 16px;
}

.metric-card {
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 14px;
    background: #fbfcfd;
}

.metric-card span,
.metric-title {
    color: #52616b;
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}

.metric-card strong {
    font-size: 24px;
}

.status-badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
}

.status-badge.healthy,
.status-badge.configured {
    background: #ecfdf3;
    color: #14532d;
}

.status-badge.degraded {
    background: #fffbeb;
    color: #92400e;
}

.status-badge.unavailable,
.status-badge.not-configured {
    background: #fef2f2;
    color: #7f1d1d;
}

pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #f7f8fa;
    border: 1px solid #d9e2ec;
    padding: 12px;
}

.provider-run-payload {
    max-height: 400px;
    max-width: 100%;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.provider-run-section {
    margin-top: 16px;
    max-width: 100%;
}

.provider-run-copy {
    margin: 8px 0;
}

.provider-run-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 8px 0;
}

.provider-run-actions [aria-pressed="true"] {
    background: #183b56;
    color: #fff;
}

.admin-pager {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-top: 16px;
}

.admin-pager-links {
    align-items: center;
    display: flex;
    gap: 8px;
}

.admin-pager-jump {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
}

.admin-pager-jump input {
    width: 76px;
}

.login-brand {
    margin-bottom: 20px;
}

.login-brand strong {
    color: #183b56;
    display: block;
    font-size: 22px;
}

.login-brand h1 {
    font-size: 18px;
    margin: 6px 0 0;
}

.captcha-row {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.captcha-row img {
    background: #f7f9fc;
    border: 1px solid #d9e2ec;
    cursor: pointer;
    display: block;
    height: 46px;
    width: 132px;
}

.link-button {
    background: transparent;
    border: 0;
    color: #0b66c3;
    cursor: pointer;
    padding: 4px;
}
@media (max-width: 760px) {
    .workspace-sidebar {
        flex-basis: 200px;
    }

    .workspace-brand {
        gap: 8px;
        padding: 12px 10px;
    }

    .workspace-brand strong {
        font-size: 14px;
    }

    .workspace-content {
        padding: 16px;
        width: calc(100% - 32px);
    }
}
