:root {
    --pui-bg: #f5f7fa;
    --pui-surface: #ffffff;
    --pui-border: #e5e9f0;
    --pui-text-muted: #667085;
    --pui-radius: .75rem;
}

html, body { min-height: 100%; }

.pui-body {
    background: var(--pui-bg);
    color: #182230;
}

.pui-topbar {
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--pui-border);
    backdrop-filter: blur(10px);
}

.pui-topbar .navbar { min-height: 64px; }

.pui-nav-toggle {
    padding: .35rem;
    border-radius: .5rem;
}
.pui-nav-toggle:hover,
.pui-nav-toggle:focus {
    background: #f2f4f7;
}
.pui-nav-toggle .navbar-toggler-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.pui-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: #182230;
    text-decoration: none;
}

.pui-brand:hover { color: #182230; }

.pui-brand-mark,
.pui-account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    font-weight: 700;
}

.pui-brand-mark {
    width: 34px;
    height: 34px;
    color: #fff;
    background: #0d6efd;
    font-size: .95rem;
}

.pui-brand-name { display: block; font-weight: 700; line-height: 1.05; }
.pui-brand-product { display: block; color: var(--pui-text-muted); font-size: .72rem; line-height: 1.1; }

.pui-account-avatar {
    width: 30px;
    height: 30px;
    background: #eef2f6;
    color: #344054;
    font-size: .78rem;
}

.pui-account-name { max-width: 220px; }
.pui-account-menu .dropdown { margin-left: 0 !important; }

.pui-shell { max-width: 1800px; margin: 0 auto; }

.pui-main {
    min-width: 0;
    background: var(--pui-surface);
    border: 1px solid var(--pui-border);
    border-radius: var(--pui-radius);
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(16,24,40,.03);
}

.pui-sidebar { position: sticky; top: 88px; }

.pui-resource-nav {
    overflow: hidden;
    border: 1px solid var(--pui-border);
    border-radius: var(--pui-radius);
    background: var(--pui-surface);
    box-shadow: 0 1px 2px rgba(16,24,40,.03);
}

.pui-resource-nav-header { padding: .9rem 1rem .75rem; border-bottom: 1px solid var(--pui-border); }
.pui-resource-nav-title { font-weight: 650; line-height: 1.2; }
.pui-resource-nav-type { color: var(--pui-text-muted); font-size: .78rem; margin-top: .15rem; }
.pui-resource-nav .list-group-item { border: 0; border-bottom: 1px solid #f0f2f5; padding: .72rem 1rem; font-size: .9rem; }
.pui-resource-nav .list-group-item:last-child { border-bottom: 0; }
.pui-resource-nav .list-group-item.active { background: #eef5ff; color: #0b5ed7; font-weight: 600; }

.pui-nav-offcanvas { width: min(86vw, 340px); }
.pui-nav-offcanvas .pui-resource-nav {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.pui-nav-offcanvas .pui-resource-nav-header { border-top: 0; }

.breadcrumb { font-size: .82rem; }
.breadcrumb a { text-decoration: none; }

.form-label { font-size: .875rem; font-weight: 600; color: #344054; }
.form-control, .form-select { border-color: #d0d5dd; border-radius: .5rem; }
.form-control:focus, .form-select:focus { border-color: #86b7fe; box-shadow: 0 0 0 .2rem rgba(13,110,253,.12); }

.pui-page-header h1 { letter-spacing: -.01em; }

.pui-listing-toolbar {
    padding: .9rem 1rem;
    border: 1px solid var(--pui-border);
    border-radius: .65rem;
    background: #fafbfc;
}

.pui-listing-table { background: var(--pui-surface); }
.pui-listing-table .table {
    width: 100%;
    margin-bottom: 0;
    table-layout: fixed;
}
.pui-listing-table .table > :not(caption) > * > * {
    padding: .8rem .9rem;
    border-color: #edf0f3;
    overflow-wrap: anywhere;
}
.pui-listing-table .table thead th {
    color: #667085;
    background: #fafbfc;
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .01em;
    border-bottom-width: 1px;
}
.pui-listing-table .table tbody td {
    font-size: .88rem;
    color: #344054;
}
.pui-listing-table .table tbody tr:last-child td { border-bottom: 0; }
.pui-listing-table .table-hover > tbody > tr:hover > * { background: #fbfcfe; }
/* Only the synthetic actions column is compact. A normal last data column must keep its default share. */
.pui-listing-table .table thead th:has(> .visually-hidden),
.pui-listing-table .table td.pui-row-actions {
    width: 7.5rem;
}
.pui-listing-table .text-nowrap { overflow-wrap: normal; }

.pui-row-primary-link {
    color: #182230;
    font-weight: 600;
    text-decoration: none;
}
.pui-row-primary-link:hover { color: #0d6efd; }

.pui-row-actions { width: 7.5rem; }
.pui-actions-menu {
    width: 32px;
    padding-left: .35rem;
    padding-right: .35rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pui-empty-state { background: #fafbfc; }
.pui-listing-footer { min-height: 42px; }

.table { margin-bottom: 0; }
.table > :not(caption) > * > * { padding-top: .7rem; padding-bottom: .7rem; }
.table thead th { color: #475467; font-size: .78rem; font-weight: 650; border-bottom-width: 1px; }
.table tbody td { font-size: .88rem; }

.btn { border-radius: .5rem; }
.alert { border-radius: .65rem; }

@media (max-width: 991.98px) {
    .pui-shell { padding-top: 1rem !important; }
    .pui-main { padding: 1rem; }
    .pui-account-menu .btn,
    .pui-account-menu .nav-link { white-space: nowrap; }
}

@media (max-width: 575.98px) {
    .pui-brand-product { display: none; }
    .pui-account-menu .btn,
    .pui-account-menu .nav-link { font-size: .875rem; padding-left: .5rem; padding-right: .25rem; }

    .pui-page-header { align-items: flex-start !important; }
    .pui-listing-toolbar { padding: .75rem; }
    .pui-listing-table .table > :not(caption) > * > * { padding: .72rem .75rem; }
}
