body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

#menu {
    padding: 18px;
    border-bottom: 1px solid rgb(190, 190, 190);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#menu a {
    text-decoration: none;
    color: rgb(80,80,80);
    font-weight: bold;
    padding: 8px 12px;
    white-space: nowrap;
}

#menu a:hover, #menu a.active {
    background-color: rgb(240, 240, 240);
    border-radius: 8px;
}

#main {
    padding: 16px 32px;
}

.submenu {
    text-align: right;
    padding-bottom: 16px;
}

.submenu a, .linkslist a, a.button {
    text-decoration: none;
    color: rgb(80,80,80);
    padding: 8px 12px;
}

.submenu a:hover, #menu a.active, .linkslist a:hover, a.button:hover {
    background-color: rgb(240, 240, 240);
    border-radius: 8px;
}

#menu a.active {
    border-bottom: 2px solid rgb(120,120,120);
}

.filter {
    text-align: right;
    padding-top: 18px;
}

.bigtable {
    margin: 0;
    padding: 0;
    font-size: 12px;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.bigtable a {
    text-decoration: none;
    color: rgb(80,80,80);
    padding: 6px 8px;
}

.bigtable a:hover, #menu a.active {
    background-color: rgb(240, 240, 240);
    border-radius: 8px;
}

.bigtable td, .bigtable th {
    text-align: left;
    padding: 8px;
    margin: 0;
    border-collapse: collapse;
    border-spacing: 0;
    border-bottom: 1px solid rgb(240,240,240);
}

.bigtable th {
    border-bottom: 1px solid rgb(190, 190, 190);
}

.bigtable tr:not(:first-child):hover {
    background-color: rgb(250,250,250);
}

.prDetailTable {
    margin: 0;
    padding: 0;
    font-size: 12px;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.prDetailTable a {
    text-decoration: none;
    color: rgb(80,80,80);
    padding: 6px 8px;
}

.prDetailTable a:hover, #menu a.active {
    background-color: rgb(240, 240, 240);
    border-radius: 8px;
}

.fileOptions {
    text-align: right;
}

.review {
    font-size: 14px;
    line-height: 160%;
    padding-top: 6px;
}

p {
    margin: 0;
    padding-bottom: 6px;
}

table.widthAuto {
    width: auto;
}

h2 {
    padding: 0;
    margin: 0;
    padding-top: 24px;
    padding-bottom: 6px;
    font-size: 16px;
}

.linkslist {
    padding: 12px 0;
}

.message {
    padding: 12px;
    background-color: rgb(240,240,240);
    font-size: 12px;
    color: rgb(120,120,120);
    margin-bottom: 20px;
}

#menu_l {
    flex: 1 1 0%;
    min-width: 0;
    align-self: stretch;
}

#menu_l_inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-width: 0;
    width: 100%;
}

#menu_l_row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px 0;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

#menu_l.menu_l--stacked #menu_l_inner {
    flex-wrap: wrap;
}

#menu_l.menu_l--stacked #menu_l_row {
    flex-wrap: wrap;
    overflow: visible;
}

.menu_overflow_wrap {
    position: relative;
    flex-shrink: 0;
    align-self: center;
}

.menu_overflow_btn {
    font: inherit;
    font-weight: bold;
    color: rgb(80, 80, 80);
    padding: 8px 12px;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    white-space: nowrap;
}

.menu_overflow_btn:hover {
    background-color: rgb(240, 240, 240);
}

.menu_overflow_btn--active {
    border-bottom: 2px solid rgb(120, 120, 120);
}

.menu_overflow_panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 220px;
    max-height: min(70vh, 480px);
    overflow-y: auto;
    background: #fff;
    border: 1px solid rgb(190, 190, 190);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 2000;
    padding: 6px 0;
    flex-direction: column;
    align-items: stretch;
    display: none;
}

.menu_overflow_panel.is-open {
    display: flex;
}

.menu_overflow_panel a {
    display: block;
    border-radius: 0;
    white-space: nowrap;
}

.menu_overflow_panel a:hover,
.menu_overflow_panel a.active {
    background-color: rgb(240, 240, 240);
    border-radius: 0;
}

#menu_r {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
    flex-shrink: 0;
}

body.has-sidebar {
    --portal-sidebar-width: 270px;
    display: grid;
    grid-template-columns: var(--portal-sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    background: linear-gradient(to right, #202938 0, #202938 var(--portal-sidebar-width), #fff var(--portal-sidebar-width), #fff 100%);
    color: #1f2937;
}

body.has-sidebar #menu {
    position: static;
    min-height: 100vh;
    max-width: none;
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 22px;
    overflow: visible;
    padding: 22px 18px;
    border-bottom: 0;
    background: #202938;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

body.has-sidebar #main {
    min-width: 0;
    min-height: 100vh;
    padding: 28px 32px 44px;
    box-sizing: border-box;
    background: #fff;
}

body.has-sidebar.body_dash #main {
    background: #f2f7fb;
}

body.has-sidebar.body_dash {
    background: linear-gradient(to right, #202938 0, #202938 var(--portal-sidebar-width), #f2f7fb var(--portal-sidebar-width), #f2f7fb 100%);
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    text-decoration: none;
}

#menu a.portal-brand {
    justify-content: flex-start;
    padding: 0;
    color: #fff;
    white-space: normal;
}

#menu a.portal-brand:hover {
    background: transparent;
}

body.has-sidebar #menu a.portal-brand:hover,
body.has-sidebar #menu a.portal-brand:focus {
    background: transparent;
    box-shadow: none;
}

.portal-brand__mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: #b31522;
    flex: 0 0 44px;
}

.portal-brand__mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-brand__text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.portal-brand__text strong {
    color: #fff;
    font-size: 16px;
    line-height: 1.1;
}

.portal-brand__text span {
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
}

.portal-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.portal-menu-toggle:hover,
.portal-menu-toggle:focus {
    background: rgba(255, 255, 255, 0.14);
    outline: none;
}

.portal-menu-toggle__icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 18px;
    height: 18px;
}

.portal-menu-toggle__icon span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.portal-menu-toggle__text {
    line-height: 1;
}

.portal-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.portal-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
}

.portal-sidebar-toggle:focus-visible {
    outline: 2px solid #6ea8ff;
    outline-offset: 3px;
}

.portal-sidebar-toggle__icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media screen and (min-width: 901px) {
    body.has-sidebar #menu {
        position: relative;
    }

    body.has-sidebar:not(.sidebar-collapsed) #menu a.portal-brand {
        padding-right: 34px;
    }

    body.has-sidebar .portal-sidebar-toggle {
        display: inline-flex;
        position: absolute;
        top: 12px;
        right: 10px;
    }

    body.has-sidebar.sidebar-collapsed {
        --portal-sidebar-width: 80px;
    }

    body.has-sidebar.sidebar-collapsed #menu {
        padding-top: 44px;
    }

    body.has-sidebar.sidebar-collapsed #menu a.portal-brand {
        padding-right: 0;
    }

    body.has-sidebar.sidebar-collapsed .portal-sidebar-toggle {
        top: 8px;
        right: 8px;
    }

    body.has-sidebar.sidebar-collapsed #menu_l,
    body.has-sidebar.sidebar-collapsed #menu_r,
    body.has-sidebar.sidebar-collapsed .portal-brand__text {
        display: none;
    }

    body.has-sidebar.sidebar-collapsed .portal-sidebar-toggle__icon {
        transform: rotate(180deg);
    }
}

body.has-sidebar #menu_l,
body.has-sidebar #menu_l_inner,
body.has-sidebar #menu_l_row {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

body.has-sidebar #menu_l {
    flex: 1 1 auto;
    align-self: stretch;
}

body.has-sidebar #menu_l_inner,
body.has-sidebar #menu_l_row,
body.has-sidebar #menu_r {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

body.has-sidebar #menu_l_row {
    gap: 5px;
    overflow: hidden;
}

body.has-sidebar #menu a,
body.has-sidebar .menu_overflow_btn {
    color: #dce6f2;
}

body.has-sidebar #menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 40px;
    border-radius: 8px;
    padding: 0 12px;
    white-space: normal;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

body.has-sidebar #menu a > span:first-child,
body.has-sidebar #menu .menu-shared-dashboard-link,
body.has-sidebar #menu .menu-tool-link {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.has-sidebar #menu a.portal-brand {
    justify-content: flex-start;
    gap: 12px;
    min-height: 50px;
    padding: 0;
}

body.has-sidebar #menu a:hover,
body.has-sidebar #menu a.active {
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.has-sidebar #menu a.active {
    box-shadow: inset 3px 0 0 #6ea8ff;
}

.menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    padding: 0 7px;
    background: #ff5722;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

body.has-sidebar .menu_overflow_wrap {
    display: none;
}

body.has-sidebar #menu_r {
    flex-shrink: 0;
    gap: 5px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

body.has-sidebar #menu_r a {
    min-height: 40px;
}

.menu-section-label {
    padding: 0 12px 4px;
    color: #9caaba;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.menu-tool-links,
.menu-shared-dashboards,
.menu-favorite-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.menu-favorite-links[hidden] {
    display: none;
}

body.has-sidebar #menu_l_inner > .menu-tool-links,
body.has-sidebar #menu_l_inner > .menu-shared-dashboards,
body.has-sidebar #menu_l_inner > .menu-favorite-links {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.menu-dashboard-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
}

.menu-dashboard-group + .menu-dashboard-group {
    margin-top: 4px;
}

.menu-dashboard-group-panel {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.menu-dashboard-group-panel[hidden] {
    display: none;
}

.menu-dashboard-group-label {
    padding: 2px 12px 0;
    color: #9caaba;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.menu-dashboard-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
    min-height: 36px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #cbd5e1;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

.menu-dashboard-toggle:hover,
.menu-dashboard-toggle:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.menu-dashboard-toggle__main {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.menu-dashboard-toggle__icon {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    color: #9caaba;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    flex: 0 0 24px;
}

.menu-dashboard-toggle__icon svg {
    display: block;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: rotate(90deg);
    transition: transform 150ms ease;
}

.menu-dashboard-group.is-collapsed .menu-dashboard-toggle__icon svg {
    transform: rotate(0deg);
}

.menu-dashboard-group--active .menu-dashboard-toggle {
    color: #fff;
}

.menu-dashboard-group--active .menu-dashboard-toggle__icon {
    color: #fff;
    background: rgba(110, 168, 255, 0.24);
    box-shadow: inset 0 0 0 1px rgba(110, 168, 255, 0.28);
}

.menu-dashboard-toggle__label {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.menu-dashboard-toggle__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    padding: 0 7px;
    color: #dce6f2;
    background: rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 800;
    flex: 0 0 auto;
}

.menu-dashboard-toggle:hover .menu-dashboard-toggle__icon,
.menu-dashboard-toggle:focus-visible .menu-dashboard-toggle__icon {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.menu-tool-link__main {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    max-width: 100%;
}

.menu-tool-icon {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    color: #6ea8ff;
    background: rgba(110, 168, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(110, 168, 255, 0.2);
    flex: 0 0 24px;
}

.menu-tool-icon svg {
    display: block;
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-tool-label {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#menu a.menu-tool-link:hover .menu-tool-icon,
#menu a.menu-tool-link.active .menu-tool-icon {
    color: #fff;
    background: rgba(110, 168, 255, 0.24);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

body.has-sidebar #menu .menu-shared-dashboard-link {
    min-height: 34px;
    padding-left: 20px;
    font-size: 13px;
}

body.has-sidebar #menu .menu-tool-link {
    padding-left: 12px;
}

body.has-sidebar #menu_r > a:last-child {
    margin-top: 8px;
}

body.has-sidebar .logout {
    display: none;
}

.cb {
    clear: both;
    font-size: 1px;
}

#menu .cb {
    display: none;
}

.columnr {
    width: 50%;
    float: right;
}

.columnrpadd {
    padding-left: 30px;
}

.columnl {
    width: 50%;
    float: left;
}

.columnlpadd {
    padding-right: 30px;
}

.logout {
    text-align: right;
}

.logout a {
    color: #aaa;
    font-size: 9px;
    text-decoration: none;
}

.logout a:hover {
    text-decoration: underline;
}

/* Pagination styles */
.pagination {
    text-align: center;
    margin: 20px 0;
    padding: 10px;
}

.pagination a, .pagination span, .pagination-link {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.pagination a:hover, .pagination-link:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

.pagination-current {
    background-color: #007cba !important;
    color: white !important;
    border-color: #007cba !important;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #666;
}

/* Status badge styles */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-open {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.status-merged {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-declined {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.badge-admin-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 16px;
}

.badge-admin-tabs a.active {
    background-color: rgb(240, 240, 240);
    border-bottom: 2px solid rgb(120, 120, 120);
    border-radius: 8px;
}

.badge-admin-form,
.badge-admin-filter {
    border: 1px solid rgb(220, 220, 220);
    margin-bottom: 18px;
    padding: 12px;
}

.badge-admin-form__row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.badge-admin-form label,
.badge-admin-filter label {
    color: rgb(80, 80, 80);
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: bold;
    gap: 4px;
}

.badge-admin-form input,
.badge-admin-form select,
.badge-admin-form textarea,
.badge-admin-filter select,
.badge-admin-table input,
.badge-admin-table select,
.badge-admin-table textarea {
    box-sizing: border-box;
    font: inherit;
    min-height: 32px;
    min-width: 160px;
    padding: 6px 8px;
}

.badge-admin-form textarea,
.badge-admin-table textarea {
    resize: vertical;
}

.badge-admin-form input[name="badgeMessage"],
.badge-admin-form input[name="note"],
.badge-admin-form input[name="description"],
.badge-admin-form textarea[name="ai_prompt"],
.badge-admin-table input[name="description"],
.badge-admin-table textarea[name="ai_prompt"] {
    min-width: 280px;
}

.badge-admin-form__button {
    align-self: end;
    border: 1px solid rgb(220, 220, 220);
    background: #fff;
    cursor: pointer;
    min-height: 32px;
}

.badge-admin-filter {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    text-align: left;
}

.badge-admin-table td {
    vertical-align: top;
}

.badge-admin-badge {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 260px;
}

.badge-admin-preview {
    height: 42px;
    width: 42px;
}

.badge-admin-preview--fallback {
    align-items: center;
    background: #f2f4f7;
    border: 1px solid #d0d5dd;
    border-radius: 50%;
    color: #344054;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
    letter-spacing: 0;
}

.badge-admin-muted {
    color: rgb(120, 120, 120);
    font-size: 11px;
    margin-top: 4px;
}

.badge-admin-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.badge-admin-actions .button {
    background: #fff;
    border: 1px solid rgb(220, 220, 220);
    cursor: pointer;
    text-align: center;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE SUPPORT
   ======================================== */

/* Tablets and smaller (below 1024px) */
@media screen and (max-width: 1024px) {
    #main {
        padding: 12px 16px;
    }
    
    /* Make two-column layouts stack */
    .columnr,
    .columnl {
        width: 100%;
        float: none;
    }
    
    .columnrpadd,
    .columnlpadd {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Mobile devices (below 768px) */
@media screen and (max-width: 768px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    img,
    svg,
    video,
    canvas {
        max-width: 100%;
    }

    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea,
    button {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Adjust menu for mobile */
    #menu {
        padding: 12px;
    }
    
    #menu a {
        display: inline-block;
        padding: 6px 8px;
        font-size: 13px;
    }
    
    #menu_l,
    #menu_r {
        float: none;
        width: 100%;
    }
    
    /* Main content area */
    #main {
        padding: 12px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Submenu responsive */
    .submenu {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        text-align: left;
        padding-bottom: 12px;
    }

    .submenu a,
    .linkslist a,
    a.button {
        display: inline-flex;
        align-items: center;
        min-height: 34px;
        box-sizing: border-box;
    }
    
    /* Make tables responsive */
    .bigtable {
        font-size: 11px;
    }
    
    .bigtable,
    .prDetailTable {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .bigtable td,
    .bigtable th {
        padding: 6px;
        white-space: nowrap;
    }
    
    /* Filter */
    .filter {
        text-align: left;
        padding-top: 12px;
    }
    
    /* Pagination adjustments */
    .pagination a,
    .pagination span,
    .pagination-link {
        padding: 6px 8px;
        font-size: 12px;
        margin: 0 1px;
    }
}

/* Small mobile devices (below 480px) */
@media screen and (max-width: 480px) {
    /* Compact menu */
    #menu {
        padding: 8px;
    }
    
    #menu a {
        display: block;
        margin: 4px 0;
    }
    
    /* Main content */
    #main {
        padding: 8px;
    }
    
    /* Smaller tables */
    .bigtable {
        font-size: 10px;
    }
    
    .bigtable td,
    .bigtable th {
        padding: 4px;
    }
    
    /* Submenu links */
    .submenu a,
    .linkslist a,
    a.button {
        display: inline-block;
        margin: 4px 0;
        padding: 6px 10px;
    }
    
    /* Pagination more compact */
    .pagination {
        padding: 8px 0;
    }
    
    .pagination a,
    .pagination span,
    .pagination-link {
        padding: 4px 6px;
        font-size: 11px;
    }
    
    /* Headings */
    h2 {
        font-size: 14px;
        padding-top: 16px;
    }
    
    /* Status badges */
    .status-badge {
        font-size: 0.75em;
        padding: 3px 6px;
    }
}

@media screen and (max-width: 900px) {
    body.has-sidebar {
        display: block;
        background: #f2f7fb;
    }

    body.has-sidebar #menu {
        position: sticky;
        top: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        align-content: start;
        height: auto;
        min-height: 0;
        max-height: none;
        padding: 10px 12px;
        gap: 10px 12px;
        overflow: hidden;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: none;
    }

    body.has-sidebar #menu.menu-open {
        position: static;
        max-height: none;
        overflow-x: hidden;
        overflow-y: visible;
    }

    body.has-sidebar #menu a.portal-brand {
        min-height: 44px;
    }

    body.has-sidebar .portal-brand__mark {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    body.has-sidebar .portal-brand__text strong {
        font-size: 15px;
    }

    body.has-sidebar .portal-brand__text span {
        font-size: 11px;
    }

    body.has-sidebar .portal-menu-toggle {
        display: inline-flex;
    }

    body.has-sidebar #menu_l,
    body.has-sidebar #menu_r {
        display: none;
        grid-column: 1 / -1;
        width: 100%;
    }

    body.has-sidebar #menu.menu-open #menu_l,
    body.has-sidebar #menu.menu-open #menu_r {
        display: flex;
    }

    body.has-sidebar #menu.menu-open .menu-tool-links,
    body.has-sidebar #menu.menu-open .menu-shared-dashboards,
    body.has-sidebar #menu.menu-open .menu-favorite-links:not([hidden]) {
        display: flex;
    }

    body.has-sidebar #menu_l_inner,
    body.has-sidebar #menu_l_row,
    body.has-sidebar #menu_r {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    body.has-sidebar #menu_l.menu_l--stacked #menu_l_inner,
    body.has-sidebar #menu_l.menu_l--stacked #menu_l_row {
        flex-wrap: nowrap;
    }

    body.has-sidebar #menu_l_row,
    body.has-sidebar #menu_r {
        gap: 5px;
    }

    body.has-sidebar #menu_l_row,
    body.has-sidebar #menu_l_inner > .menu-tool-links,
    body.has-sidebar #menu_l_inner > .menu-shared-dashboards,
    body.has-sidebar #menu_l_inner > .menu-favorite-links {
        flex: 0 0 auto;
    }

    body.has-sidebar #menu a {
        min-height: 38px;
        padding: 0 10px;
    }

    body.has-sidebar #menu_r {
        margin-top: 0;
        padding-top: 12px;
    }

    .menu-tool-links,
    .menu-shared-dashboards,
    .menu-favorite-links {
        flex: 0 0 auto;
        gap: 8px;
    }

    .menu-dashboard-group {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .menu-dashboard-group-label {
        flex: 1 1 100%;
        padding-top: 6px;
    }

    body.has-sidebar #menu_r > a:last-child {
        margin-top: 0;
    }

    body.has-sidebar #main {
        min-height: auto;
        padding: 18px 14px 32px;
    }
}

@media screen and (max-width: 480px) {
    body.has-sidebar #menu {
        padding: 8px 10px;
        gap: 8px 10px;
    }

    body.has-sidebar .portal-menu-toggle__text {
        display: none;
    }

    body.has-sidebar #main {
        padding: 12px 10px 28px;
    }
}
