:root {
    --workspace-sidebar-width: 252px;
    --workspace-sidebar-compact-width: 78px;
}

.workspace-layout {
    min-width: 0;
    padding-left: var(--workspace-sidebar-width);
    transition: padding-left var(--pb-motion-panel, 200ms) ease;
}

.workspace-layout.sidebar-compact {
    padding-left: var(--workspace-sidebar-compact-width);
}

.workspace-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    display: flex;
    width: var(--workspace-sidebar-width);
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, .1);
    background: #0b3b2e;
    color: #fff;
    box-shadow: 12px 0 32px rgba(8, 43, 33, .12);
    transition: width var(--pb-motion-panel, 200ms) ease;
}

.sidebar-compact .workspace-sidebar {
    width: var(--workspace-sidebar-compact-width);
}

.workspace-sidebar-brand {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    color: #fff;
    text-decoration: none;
}

.workspace-sidebar-brand > .admin-brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 13px;
    background: #55d28a;
    color: #073427;
    font-size: 17px;
}

.workspace-sidebar-brand-text,
.workspace-sidebar-brand-text small {
    display: block;
    white-space: nowrap;
}

.workspace-sidebar-brand-text {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
}

.workspace-sidebar-brand-text > span {
    color: #55d28a;
}

.workspace-sidebar-brand-text small {
    margin-top: 3px;
    color: rgba(255, 255, 255, .62);
    font-size: 11px;
    letter-spacing: .04em;
}

.workspace-sidebar-nav {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 15px 12px;
    scrollbar-color: rgba(255, 255, 255, .24) transparent;
    scrollbar-width: thin;
}

.workspace-sidebar-section {
    margin: 13px 9px 5px;
    color: rgba(255, 255, 255, .47);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.workspace-sidebar-section:first-child {
    margin-top: 2px;
}

.workspace-sidebar-link,
.workspace-sidebar-toggle {
    position: relative;
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 13px;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    color: rgba(255, 255, 255, .78);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--pb-motion-fast, 150ms) ease, background var(--pb-motion-fast, 150ms) ease, transform var(--pb-motion-fast, 150ms) ease;
}

.workspace-sidebar-link:hover,
.workspace-sidebar-link:focus-visible,
.workspace-sidebar-toggle:hover,
.workspace-sidebar-toggle:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    outline: none;
}

.workspace-sidebar-link:focus-visible,
.workspace-sidebar-toggle:focus-visible {
    box-shadow: inset 0 0 0 2px #7ce4a9;
}

.workspace-sidebar-link.is-active {
    color: #073427;
    background: #55d28a;
}

.workspace-sidebar-link > i,
.workspace-sidebar-toggle > i {
    width: 20px;
    flex: 0 0 20px;
    font-size: 16px;
    text-align: center;
}

.workspace-sidebar-link > span,
.workspace-sidebar-toggle > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-sidebar-count {
    min-width: 24px;
    margin-left: auto;
    padding: 3px 6px;
    border-radius: 999px;
    color: #073427;
    background: #fff;
    font-size: 10px;
    text-align: center;
}

.workspace-sidebar-footer {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.workspace-sidebar-credit {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    text-decoration: none;
}

.workspace-sidebar-credit > i {
    width: 20px;
    color: #55d28a;
    text-align: center;
}

.workspace-sidebar-credit span,
.workspace-sidebar-credit small,
.workspace-sidebar-credit strong {
    display: block;
    white-space: nowrap;
}

.workspace-sidebar-credit small {
    color: rgba(255, 255, 255, .57);
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.workspace-sidebar-credit strong {
    margin-top: 2px;
    font-size: 14px;
}

.workspace-sidebar-toggle {
    width: 100%;
}

.workspace-sidebar-toggle > i {
    transition: transform var(--pb-motion-panel, 200ms) ease;
}

.sidebar-compact .workspace-sidebar-toggle > i {
    transform: rotate(180deg);
}

.workspace-layout > .admin-header .admin-brand {
    display: none;
}

.workspace-layout > .admin-header .admin-header-inner {
    justify-content: flex-end;
}

.workspace-layout > .admin-header,
.workspace-layout > main,
.workspace-layout > .debug-toolbar {
    min-width: 0;
}

.sidebar-compact .workspace-sidebar-brand-text,
.sidebar-compact .workspace-sidebar-section,
.sidebar-compact .workspace-sidebar-link > span,
.sidebar-compact .workspace-sidebar-toggle > span,
.sidebar-compact .workspace-sidebar-credit > span {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sidebar-compact .workspace-sidebar-section {
    display: none;
}

.sidebar-compact .workspace-sidebar-brand,
.sidebar-compact .workspace-sidebar-link,
.sidebar-compact .workspace-sidebar-toggle,
.sidebar-compact .workspace-sidebar-credit {
    justify-content: center;
    padding-inline: 8px;
}

.sidebar-compact .workspace-sidebar-link > i,
.sidebar-compact .workspace-sidebar-toggle > i,
.sidebar-compact .workspace-sidebar-credit > i {
    margin: 0;
}

.sidebar-compact .workspace-sidebar-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    padding: 2px 4px;
    font-size: 8px;
}

.sidebar-compact .workspace-sidebar-link::after {
    position: fixed;
    left: calc(var(--workspace-sidebar-compact-width) + 8px);
    z-index: 110;
    display: none;
    padding: 8px 10px;
    border-radius: 8px;
    color: #fff;
    background: #082f24;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
    white-space: nowrap;
}

.sidebar-compact .workspace-sidebar-link:hover::after,
.sidebar-compact .workspace-sidebar-link:focus-visible::after {
    display: block;
}

/* Shared adaptive-table primitive: desktop table, mobile record cards. */
.adaptive-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.adaptive-table {
    width: 100%;
}

.adaptive-table td,
.adaptive-table th {
    overflow-wrap: anywhere;
}

@media (min-width: 801px) and (max-width: 1199px) {
    .workspace-layout,
    .workspace-layout.sidebar-compact {
        padding-left: var(--workspace-sidebar-compact-width);
    }

    .workspace-sidebar,
    .sidebar-compact .workspace-sidebar {
        width: var(--workspace-sidebar-compact-width);
    }

    .workspace-sidebar-brand-text,
    .workspace-sidebar-section,
    .workspace-sidebar-link > span,
    .workspace-sidebar-toggle > span,
    .workspace-sidebar-credit > span {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    .workspace-sidebar-section {
        display: none;
    }

    .workspace-sidebar-brand,
    .workspace-sidebar-link,
    .workspace-sidebar-toggle,
    .workspace-sidebar-credit {
        justify-content: center;
        padding-inline: 8px;
    }

    .workspace-sidebar-link::after {
        position: fixed;
        left: calc(var(--workspace-sidebar-compact-width) + 8px);
        z-index: 110;
        display: none;
        padding: 8px 10px;
        border-radius: 8px;
        color: #fff;
        background: #082f24;
        box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
        content: attr(data-label);
        font-size: 12px;
        font-weight: 700;
        pointer-events: none;
        white-space: nowrap;
    }

    .workspace-sidebar-link:hover::after,
    .workspace-sidebar-link:focus-visible::after {
        display: block;
    }
}

@media (min-width: 801px) {
    .workspace-layout .mobile-menu-button {
        display: none !important;
    }
}

@media (max-width: 800px) {
    .workspace-layout,
    .workspace-layout.sidebar-compact {
        padding-left: 0;
    }

    .workspace-sidebar {
        display: none;
    }

    .workspace-layout > .admin-header .admin-brand {
        display: inline-flex;
    }

    .workspace-layout > .admin-header .admin-header-inner {
        justify-content: space-between;
    }

    .workspace-layout .mobile-menu-button,
    .workspace-layout .admin-button,
    .workspace-layout button,
    .workspace-layout [role="button"] {
        min-height: 44px;
    }

    .adaptive-table-wrap {
        overflow: visible;
        padding: 12px;
        background: transparent;
    }

    .adaptive-table,
    .adaptive-table tbody {
        display: block;
        width: 100%;
        min-width: 0 !important;
    }

    .adaptive-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .adaptive-table tbody {
        display: grid;
        gap: 12px;
    }

    .adaptive-table tbody > tr {
        display: block;
        overflow: hidden;
        border: 1px solid #dbe5dc;
        border-radius: 15px;
        background: #fffdf8;
        box-shadow: 0 8px 22px rgba(12, 54, 42, .05);
        transition: border-color var(--pb-motion-fast, 150ms) ease, transform var(--pb-motion-fast, 150ms) ease;
    }

    .adaptive-table tbody > tr:focus-within {
        border-color: #55d28a;
    }

    .adaptive-table tbody > tr > td {
        display: grid;
        width: auto !important;
        min-width: 0;
        grid-template-columns: minmax(86px, 38%) minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 11px 13px !important;
        border: 0 !important;
        border-bottom: 1px solid #edf2ed !important;
        text-align: right !important;
        white-space: normal !important;
    }

    .adaptive-table tbody > tr > td:last-child {
        border-bottom: 0 !important;
    }

    .adaptive-table tbody > tr > td::before {
        color: #708078;
        content: attr(data-label);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .05em;
        text-align: left;
        text-transform: uppercase;
    }

    .adaptive-table tbody > tr > td[data-primary="true"] {
        display: block;
        padding-block: 14px !important;
        color: #102d25;
        background: #f4faf5;
        text-align: left !important;
    }

    .adaptive-table tbody > tr > td[data-primary="true"]::before {
        display: block;
        margin-bottom: 6px;
    }

    .adaptive-table tbody > tr > td[data-actions="true"] {
        display: block;
        padding: 12px !important;
    }

    .adaptive-table tbody > tr > td[data-actions="true"]::before {
        display: none;
    }

    .adaptive-table tbody > tr > td[data-actions="true"] > :is(a, button, form),
    .adaptive-table tbody > tr > td[data-actions="true"] > form > button {
        width: 100%;
    }

    .adaptive-table tbody > tr > td[colspan] {
        display: block;
        text-align: left !important;
    }

    .adaptive-table tbody > tr > td[colspan]::before {
        display: none;
    }
}

@media (max-width: 360px) {
    .adaptive-table-wrap {
        padding-inline: 8px;
    }

    .adaptive-table tbody > tr > td {
        grid-template-columns: 1fr;
        gap: 4px;
        text-align: left !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .workspace-layout,
    .workspace-sidebar,
    .workspace-sidebar-link,
    .workspace-sidebar-toggle,
    .workspace-sidebar-toggle > i,
    .adaptive-table tbody > tr {
        transition-duration: 1ms !important;
    }
}
