#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--pp-purple);
    color: #ecf0f1;
    padding-top: 60px; /* Space for any top nav if needed */
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

#sidebar .admin-nav {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

#sidebar .admin-nav li {
    margin: 0.5em 0;
}

#sidebar .admin-nav li a {
    color: #ecf0f1;
    text-decoration: none;
    display: block;
    padding: 0.75em 1.5em;
    border-left: 3px solid transparent;
    transition: background-color 0.2s, border-left-color 0.2s;
}

#sidebar .admin-nav li a:hover {
    background-color: rgba(0,0,0,0.1);
    border-left-color: #cabde1;
}

/* Sidebar "Website" sub-menu - a clean expand/collapse accordion nested
   in place, rather than the old flat dark (#2c3e50) block that looked
   like a separate floating layer instead of part of the sidebar. */
#sidebar .sidebar-group {
    display: grid;
    grid-template-rows: auto 0fr;
    margin: 0.5em 0;
    transition: grid-template-rows 0.25s ease;
}

#sidebar .sidebar-group.is-open {
    grid-template-rows: auto 1fr;
}

#sidebar .sidebar-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75em 1.5em;
    border: none;
    border-left: 3px solid transparent;
    background: transparent;
    color: #ecf0f1;
    font-size: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s, border-left-color 0.2s;
}

#sidebar .sidebar-group-toggle:hover,
#sidebar .sidebar-group-toggle:focus-visible {
    background-color: rgba(0, 0, 0, 0.1);
    border-left-color: #cabde1;
    outline: none;
}

#sidebar .sidebar-group-toggle span {
    display: flex;
    align-items: center;
    gap: 0.6em;
}

#sidebar .sidebar-group-chevron {
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

#sidebar .sidebar-group.is-open .sidebar-group-chevron {
    transform: rotate(180deg);
}

/* The open/close animation lives on the parent .sidebar-group's grid row
   (auto 0fr -> auto 1fr) above, not on this element's own height, so it
   doesn't force layout recalculation on every animation frame the way
   animating max-height/height does. This just needs to clip while its
   row is shrunk. */
#sidebar .sidebar-group-menu {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    min-height: 0;
    background-color: rgba(0, 0, 0, 0.12);
    border-left: 3px solid transparent;
}

#sidebar .sidebar-group.is-open .sidebar-group-menu {
    border-left-color: #cabde1;
}

#sidebar .sidebar-group-menu li a {
    display: block;
    padding: 0.6em 1.5em 0.6em 3em;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.2s;
}

#sidebar .sidebar-group-menu li a:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Bottom Section: Force it to the bottom */
#sidebar .sidebar-bottom {
    list-style-type: none;
    margin: 0;
    padding: 0;
    margin-top: auto; /* This pushes it to the bottom */
}

#sidebar .sidebar-bottom li {
    margin: 0.5em 0;
}

#sidebar .sidebar-bottom li a {
    color: #ecf0f1;
    text-decoration: none;
    display: block;
    padding: 0.75em 1.5em;
    border-left: 3px solid transparent;
    transition: background-color 0.2s, border-left-color 0.2s;
}

#sidebar .sidebar-bottom li a:hover {
    background-color: rgba(0,0,0,0.1);
    border-left-color: #b19cd9;
}
.admin-sidebar-active main.main {
    margin-left: 250px; /* match your sidebar width */
    transition: margin-left 0.3s ease; /* optional smooth transition */
}
/*# sourceMappingURL=style.css.map */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(300px, 1fr));
    grid-auto-rows: minmax(220px, auto);
    grid-template-areas:
    "summary summary quick"
    "active  archived  unread";
    gap: 20px;
    row-gap: 80px;
    margin-top: 16px;
    align-items: stretch;
}

.dash-card {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0,0,0,.06);
}

.dash-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
}

.big-num {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    margin: 6px 0 10px;
}

.dash-card .button {
    color: #4b5bdc;
    text-decoration: none;
    font-weight: 600;
}

.card-summary { grid-area: summary; }
.card-quick   { grid-area: quick; }
.card-active  { grid-area: active; }
.card-archived{ grid-area: archived; }
.card-unread  { grid-area: unread; }


@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
        grid-template-areas:
      "summary summary"
      "quick   quick"
      "active  archived"
      "unread  unread";
    }
}

@media (max-width: 640px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
      "summary"
      "quick"
      "active"
      "archived"
      "unread";
    }
    .big-num { font-size: 44px; }
}


.my-fixed-width{
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px 48px;
}


.dashboard-grid{
    grid-auto-rows: minmax(220px, auto);
    align-items: stretch;
}
.dash-card{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.big-num{ margin-top: 10px; }

.dashboard-title {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 70px;
    font-size: 42px;
    font-weight: 700;

    transform: translateX(-30px)
}


/* Sidebar brand (logo lives in the side nav, not a top navbar) */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 1.5em 20px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
}

.sidebar-brand:hover,
.sidebar-brand:focus {
    color: #fff;
    text-decoration: none;
}

.sidebar-brand-logo {
    height: 30px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
}

.sidebar-brand-text {
    font-size: 0.95rem;
    font-weight: 750;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.admin-sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 232px;
    z-index: 1100;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #dedbe9;
    border-radius: 50%;
    background: #fff;
    color: var(--pp-purple);
    box-shadow: 0 4px 14px rgba(31, 27, 52, 0.16);
    transition: left 0.3s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.admin-sidebar-toggle:hover,
.admin-sidebar-toggle:focus {
    background: var(--pp-tint);
    color: #604fc0;
    transform: scale(1.05);
}

body.admin-sidebar-active #sidebar {
    transition: transform 0.3s ease;
}

body.admin-sidebar-active.nav-collapsed #sidebar {
    transform: translateX(-100%);
}

body.admin-sidebar-active.nav-collapsed main.main {
    margin-left: 0;
}

body.admin-sidebar-active.nav-collapsed .admin-sidebar-toggle {
    left: 14px;
    border-color: #dedbe9;
    background: #fff;
    color: var(--pp-purple);
    box-shadow: 0 4px 14px rgba(31, 27, 52, 0.12);
}
body.admin-sidebar-active .menu-trigger { display: none !important; }

body.admin-sidebar-active {
    background: #f5f6fa;
}

body.admin-sidebar-active main.main {
    min-height: 100vh;
    padding: 0;
    background: #f5f6fa;
}

.admin-dashboard-page {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 54px 44px 72px;
    color: #202129;
}

.admin-welcome-title {
    margin: 0 0 28px;
    color: #202129;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 750;
    line-height: 1.2;
}

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-heading h1 {
    margin: 2px 0 8px;
    color: #202129;
    font-size: clamp(2rem, 3vw, 2.7rem);
    font-weight: 750;
    line-height: 1.15;
}

.dashboard-eyebrow,
.panel-kicker {
    margin: 0;
    color: var(--pp-purple);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.dashboard-welcome {
    margin: 0;
    color: #70768a;
    font-size: 1rem;
}

.dashboard-primary-action {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 9px;
    padding: 13px 18px;
    border-radius: 10px;
    background: var(--pp-purple);
    box-shadow: 0 6px 15px rgba(123, 106, 216, 0.22);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-primary-action:hover,
.dashboard-primary-action:focus {
    background: #6959c5;
    color: #fff;
    text-decoration: none;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.metric-card,
.dashboard-panel {
    border: 1px solid #e0e3ec;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(36, 40, 62, 0.045);
}

.metric-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    min-height: 150px;
    padding: 22px;
}

.metric-icon,
.archive-icon {
    display: inline-flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: rgba(123, 106, 216, 0.13);
    color: var(--pp-purple);
}

.metric-icon--green {
    background: #e6f8f0;
    color: #24aa76;
}

.metric-icon--blue {
    background: #e9f1ff;
    color: #4c7fd7;
}

.metric-icon--orange {
    background: #fff2df;
    color: #d78a28;
}

.metric-card p,
.archive-panel p {
    margin: 0 0 7px;
    color: #6e758a;
    font-size: 0.77rem;
    font-weight: 750;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.metric-card strong,
.archive-panel strong {
    display: block;
    margin-bottom: 7px;
    color: #202129;
    font-size: 2rem;
    line-height: 1;
}

.metric-card span,
.metric-card a {
    color: #858b9d;
    font-size: 0.78rem;
}

.metric-card a {
    color: var(--pp-purple);
    font-weight: 700;
    text-decoration: none;
}

.dashboard-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(290px, 0.75fr);
    gap: 22px;
    align-items: start;
}

.dashboard-panel {
    padding: 24px;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.panel-heading h2 {
    margin: 4px 0 0;
    color: #25262e;
    font-size: 1.1rem;
    font-weight: 750;
}

.current-year {
    padding: 6px 10px;
    border-radius: 7px;
    background: #f1effc;
    color: var(--pp-purple);
    font-size: 0.8rem;
    font-weight: 750;
}

.dashboard-chart-panel .chart-container {
    position: relative;
    width: 100%;
    height: 390px;
}

.chart-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    border: 1px dashed #d9dce6;
    border-radius: 10px;
    background: #fafbfe;
    color: #858b9d;
    text-align: center;
}

.chart-empty-state[hidden] {
    display: none;
}

.chart-empty-state i {
    margin-bottom: 4px;
    color: var(--pp-purple);
    font-size: 1.8rem;
}

.chart-empty-state strong {
    color: #454b5c;
}

.chart-empty-state span {
    font-size: 0.82rem;
}

.dashboard-side-stack {
    display: grid;
    gap: 22px;
}

.quick-action-list {
    display: grid;
}

.quick-action-list > a {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 11px;
    padding: 14px 0;
    border-top: 1px solid #eceef4;
    color: #31333d;
    text-decoration: none;
}

.quick-action-list > a:first-child {
    border-top: 0;
}

.quick-action-list > a > i:first-child {
    color: var(--pp-purple);
    text-align: center;
}

.quick-action-list span {
    font-size: 0.9rem;
    font-weight: 700;
}

.quick-action-list small {
    display: block;
    margin-top: 2px;
    color: #8a90a1;
    font-size: 0.72rem;
    font-weight: 400;
}

.quick-action-list .fa-chevron-right {
    color: #b2b6c2;
    font-size: 0.7rem;
}

.archive-panel {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 14px;
}

.archive-panel a {
    color: var(--pp-purple);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 1180px) {
    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 747px) {
    .admin-dashboard-page {
        padding: 76px 18px 48px;
    }

    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-primary-action {
        width: 100%;
        justify-content: center;
    }

    .dashboard-chart-panel .chart-container {
        height: 300px;
    }
}


@media (max-width:991px){
    .admin-sidebar-toggle{
        position:fixed; left:12px; top:12px;
        z-index:1100;
        padding:0; background:#fff; border:1px solid #eee; border-radius:8px;
        color:var(--pp-purple);
    }


    body.admin-sidebar-active #sidebar{
        width:260px;
        left:0;
        transform: translateX(calc(-100% - 2px));
        z-index:1000;
        transition: transform .25s ease;
    }
    body.admin-sidebar-active.nav-open #sidebar{ transform: translateX(0); }

    body.admin-sidebar-active.nav-collapsed #sidebar{ transform: translateX(calc(-100% - 2px)); }


    body.admin-sidebar-active main.main{ margin-left:0; }


    .backdrop{
        position:fixed; inset:0; background:rgba(0,0,0,.3);
        z-index:900; display:none;
    }
    body.nav-open .backdrop{ display:block; }

    html, body { overflow-x: clip; }
}

/* Shared admin data-table experience */
body.admin-sidebar-active {
    --admin-accent: var(--pp-purple);
    --admin-bg: #f6f7fb;
    --admin-surface: #fff;
    --admin-border: #dde1eb;
    --admin-header: #f0f2f7;
    --admin-text: #242630;
    --admin-muted: #697188;
    --admin-page-padding: 48px 42px 64px;
}

body.admin-sidebar-active main.main > .content,
body.admin-sidebar-active main.main > .enquiries-wrapper,
body.admin-sidebar-active main.main > .pallet-types,
body.admin-sidebar-active main.main > .users,
body.admin-sidebar-active main.main > .container {
    width: auto;
    max-width: 1480px;
    margin: 0 auto;
    padding: var(--admin-page-padding) !important;
}

body.admin-sidebar-active .orders .orders-header,
body.admin-sidebar-active .enquiries-wrapper > .enquiries-title {
    margin: 0 0 28px;
    text-align: left;
}

body.admin-sidebar-active .orders .orders-title,
body.admin-sidebar-active .enquiries-wrapper > .enquiries-title {
    margin: 0;
    color: var(--admin-text);
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    font-weight: 750;
    line-height: 1.2;
    text-align: left !important;
}

body.admin-sidebar-active .orders-search,
body.admin-sidebar-active .enquiries-tabs,
body.admin-sidebar-active .advanced-filters > .card {
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface);
    box-shadow: 0 3px 12px rgba(30, 35, 55, 0.025);
}

body.admin-sidebar-active .orders-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
}

body.admin-sidebar-active .orders-search form,
body.admin-sidebar-active .orders-search .form-inline {
    width: 100%;
}

body.admin-sidebar-active .orders-search label {
    color: var(--admin-muted) !important;
    font-size: 0.82rem;
    font-weight: 700;
}

body.admin-sidebar-active .orders-search .form-control,
body.admin-sidebar-active .advanced-filters .form-control,
body.admin-sidebar-active .advanced-filters select {
    min-height: 42px;
    border: 1px solid #d7dce7;
    border-radius: 8px;
    background: #fff;
    color: var(--admin-text);
    font-size: 0.88rem;
    box-shadow: none;
}

body.admin-sidebar-active .orders-search .form-control:focus,
body.admin-sidebar-active .advanced-filters .form-control:focus,
body.admin-sidebar-active .advanced-filters select:focus {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(123, 106, 216, 0.14);
}

body.admin-sidebar-active .orders-search .btn-search,
body.admin-sidebar-active .btn-primary,
body.admin-sidebar-active .btn-info {
    min-height: 42px;
    border-color: var(--admin-accent) !important;
    border-radius: 8px;
    background: var(--admin-accent) !important;
    color: #fff !important;
}

body.admin-sidebar-active .advanced-filters > .card {
    overflow: hidden;
}

body.admin-sidebar-active .advanced-filters .card-header {
    padding: 0;
    border: 0;
    background: #fff;
}

body.admin-sidebar-active .advanced-filters .card-header button {
    padding: 14px 18px;
    color: #4c5263;
    font-size: 0.88rem;
    font-weight: 700;
}

body.admin-sidebar-active .advanced-filters .card-body {
    border-top: 1px solid var(--admin-border);
    background: #fafbfe;
}

body.admin-sidebar-active .orders-tablebox,
body.admin-sidebar-active .panel-beautiful,
body.admin-sidebar-active .table-responsive {
    border-radius: 12px;
}

body.admin-sidebar-active .orders-tablebox,
body.admin-sidebar-active .panel-beautiful {
    min-height: 0;
    padding: 0;
    overflow: visible;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    box-shadow: 0 4px 16px rgba(33, 38, 59, 0.035);
}

body.admin-sidebar-active .orders-tablebox .table-responsive,
body.admin-sidebar-active .panel-beautiful .table-responsive {
    overflow-x: auto !important;
    border-radius: 11px;
}

body.admin-sidebar-active table,
body.admin-sidebar-active .orders-tablebox .table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    color: #3f4555;
    font-size: 0.86rem;
}

body.admin-sidebar-active table thead th,
body.admin-sidebar-active .orders-tablebox thead th {
    padding: 15px 14px;
    border: 0 !important;
    border-bottom: 1px solid var(--admin-border) !important;
    background: var(--admin-header) !important;
    color: #626c84 !important;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    line-height: 1.3;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

body.admin-sidebar-active table thead th:first-child {
    border-top-left-radius: 11px;
}

body.admin-sidebar-active table thead th:last-child {
    border-top-right-radius: 11px;
}

body.admin-sidebar-active table thead th a,
body.admin-sidebar-active table thead th a:visited,
body.admin-sidebar-active .orders-tablebox thead th a,
body.admin-sidebar-active .orders-tablebox thead th a:visited {
    color: #626c84 !important;
    font-weight: 800;
    text-decoration: none;
}

body.admin-sidebar-active table thead th a:hover,
body.admin-sidebar-active table thead th a:focus,
body.admin-sidebar-active .orders-tablebox thead th a:hover,
body.admin-sidebar-active .orders-tablebox thead th a:focus {
    color: var(--admin-accent) !important;
    text-decoration: none;
}

body.admin-sidebar-active table tbody td,
body.admin-sidebar-active .orders-tablebox .table td {
    padding: 15px 14px;
    border: 0 !important;
    border-bottom: 1px solid #e7e9f0 !important;
    background: #fff !important;
    color: #414758;
    line-height: 1.45;
    vertical-align: middle;
}

body.admin-sidebar-active table tbody tr:last-child td {
    border-bottom: 0 !important;
}

body.admin-sidebar-active table tbody tr:hover td,
body.admin-sidebar-active .orders-tablebox .table.table-striped tbody tr:hover td {
    background: #faf9ff !important;
}

body.admin-sidebar-active table td:first-child a:not(.dropdown-item),
body.admin-sidebar-active table td a:not(.btn):not(.dropdown-item) {
    color: #6754cc;
    font-weight: 650;
    text-decoration: none;
}

body.admin-sidebar-active .cell-ellipsis {
    max-width: 100%;
}

body.admin-sidebar-active .badge {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 750;
}

body.admin-sidebar-active .pp-actions-toggle {
    width: 34px;
    height: 32px;
    padding: 0;
    border: 1px solid #dde1ea;
    border-radius: 7px;
    background: #fff;
    color: #555d70;
    font-weight: 800;
}

body.admin-sidebar-active .pp-actions-toggle:hover,
body.admin-sidebar-active .pp-actions-toggle:focus {
    border-color: var(--admin-accent);
    background: var(--pp-tint);
    color: var(--admin-accent);
}

body.admin-sidebar-active .dropdown-menu {
    padding: 6px;
    border: 1px solid var(--admin-border);
    border-radius: 9px;
    box-shadow: 0 10px 28px rgba(28, 31, 45, 0.14);
}

body.admin-sidebar-active .dropdown-item {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
}

body.admin-sidebar-active .page-compact,
body.admin-sidebar-active .paginator {
    margin-top: 16px;
    padding: 12px 14px;
    color: var(--admin-muted);
    font-size: 0.82rem;
}

body.admin-sidebar-active .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0;
    list-style: none;
}

body.admin-sidebar-active .pagination li a,
body.admin-sidebar-active .pagination li span,
body.admin-sidebar-active .page-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--admin-border);
    border-radius: 7px;
    background: #fff;
    color: #62697c;
    text-decoration: none;
}

body.admin-sidebar-active .pagination .active a,
body.admin-sidebar-active .pagination .active span,
body.admin-sidebar-active .page-link:hover {
    border-color: var(--admin-accent);
    background: var(--admin-accent);
    color: #fff;
    text-decoration: none;
}

body.admin-sidebar-active .orders-empty {
    position: static;
    min-height: 240px;
    color: var(--admin-muted);
    font-size: 1rem;
}

@media (max-width: 991px) {
    body.admin-sidebar-active main.main > .content,
    body.admin-sidebar-active main.main > .enquiries-wrapper,
    body.admin-sidebar-active main.main > .pallet-types,
    body.admin-sidebar-active main.main > .users,
    body.admin-sidebar-active main.main > .container {
        padding: 72px 18px 48px !important;
    }

    body.admin-sidebar-active .orders-search {
        align-items: stretch !important;
        flex-direction: column;
    }

    body.admin-sidebar-active .orders-search > div,
    body.admin-sidebar-active .orders-search .form-inline,
    body.admin-sidebar-active .orders-search .form-control {
        width: 100% !important;
    }

    body.admin-sidebar-active .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    body.admin-sidebar-active table {
        min-width: 760px;
    }

    body.admin-sidebar-active .page-compact {
        align-items: center;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Shared responsive safeguards for every admin screen */
#sidebar .admin-nav i,
#sidebar .sidebar-bottom i {
    width: 22px;
    margin-right: 8px;
    text-align: center;
}

#sidebar .sidebar-bottom {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

body.admin-sidebar-active main.main {
    max-width: 100%;
    overflow-x: hidden;
}

body.admin-sidebar-active img,
body.admin-sidebar-active canvas,
body.admin-sidebar-active video {
    max-width: 100%;
}

body.admin-sidebar-active .modal-dialog {
    width: calc(100% - 30px);
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
}

body.admin-sidebar-active .form-control,
body.admin-sidebar-active .form-select,
body.admin-sidebar-active select,
body.admin-sidebar-active textarea {
    max-width: 100%;
}

@media (min-width: 1600px) {
    .admin-dashboard-page,
    body.admin-sidebar-active main.main > .content,
    body.admin-sidebar-active main.main > .enquiries-wrapper,
    body.admin-sidebar-active main.main > .pallet-types,
    body.admin-sidebar-active main.main > .users,
    body.admin-sidebar-active main.main > .container {
        max-width: 1560px;
    }
}

@media (max-width: 1200px) and (min-width: 992px) {
    .admin-dashboard-page,
    body.admin-sidebar-active main.main > .content,
    body.admin-sidebar-active main.main > .enquiries-wrapper,
    body.admin-sidebar-active main.main > .pallet-types,
    body.admin-sidebar-active main.main > .users,
    body.admin-sidebar-active main.main > .container {
        padding-right: 28px !important;
        padding-left: 28px !important;
    }

    body.admin-sidebar-active table {
        font-size: 0.8rem;
    }
}

@media (max-width: 991px) {
    #sidebar {
        height: 100vh;
        height: 100dvh;
        padding-top: 62px;
        box-shadow: 10px 0 30px rgba(31, 26, 59, 0.22);
    }

    body.admin-sidebar-active.nav-open {
        overflow: hidden;
    }

    body.admin-sidebar-active .admin-dashboard-page {
        padding: 72px 18px 48px;
    }

    body.admin-sidebar-active .dashboard-content-grid,
    body.admin-sidebar-active .dashboard-side-stack {
        min-width: 0;
    }

    body.admin-sidebar-active .orders-search .form-inline {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    body.admin-sidebar-active .orders-search .btn,
    body.admin-sidebar-active .orders-search button {
        min-width: 44px;
    }

    body.admin-sidebar-active .advanced-filters .row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    body.admin-sidebar-active .award-admin-header,
    body.admin-sidebar-active .dashboard-heading {
        align-items: stretch;
    }
}

@media (max-width: 600px) {
    body.admin-sidebar-active .admin-dashboard-page,
    body.admin-sidebar-active main.main > .content,
    body.admin-sidebar-active main.main > .enquiries-wrapper,
    body.admin-sidebar-active main.main > .pallet-types,
    body.admin-sidebar-active main.main > .users,
    body.admin-sidebar-active main.main > .container {
        padding: 68px 12px 36px !important;
    }

    body.admin-sidebar-active .dashboard-metrics {
        gap: 12px;
    }

    body.admin-sidebar-active .metric-card,
    body.admin-sidebar-active .dashboard-panel,
    body.admin-sidebar-active .orders-search,
    body.admin-sidebar-active .advanced-filters .card-body {
        padding: 16px;
    }

    body.admin-sidebar-active .advanced-filters .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    body.admin-sidebar-active .orders-search form,
    body.admin-sidebar-active .orders-search .form-inline,
    body.admin-sidebar-active .orders-search .form-control,
    body.admin-sidebar-active .orders-search select,
    body.admin-sidebar-active .orders-search .btn-primary,
    body.admin-sidebar-active .award-primary-button {
        width: 100% !important;
    }

    body.admin-sidebar-active .orders-search .btn,
    body.admin-sidebar-active .orders-search button,
    body.admin-sidebar-active .award-primary-button {
        justify-content: center;
        min-height: 44px;
    }

    body.admin-sidebar-active .archive-panel {
        grid-template-columns: 42px 1fr;
    }

    body.admin-sidebar-active .archive-panel > a {
        grid-column: 2;
    }

    body.admin-sidebar-active .dashboard-chart-panel .chart-container {
        height: 260px;
    }

    body.admin-sidebar-active .panel-heading {
        flex-wrap: wrap;
    }

    body.admin-sidebar-active table {
        min-width: 680px;
    }

    body.admin-sidebar-active .modal-dialog {
        width: calc(100% - 20px);
        margin-top: 10px;
        margin-bottom: 10px;
    }

    body.admin-sidebar-active .modal-content {
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
    }
}

/* =========================================================================
   Content Blocks admin (Website CMS)
   Styles for templates/plugin/ContentBlocks/ContentBlocks/*.php - these
   override the vendor plugin's own bundled CSS, which isn't loaded here.
   ========================================================================= */

.cb-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.cb-page-header h1 {
    margin: 2px 0 8px;
    color: var(--admin-text, #202129);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 750;
    line-height: 1.2;
}

.cb-page-subtitle {
    max-width: 62ch;
    margin: 0;
    color: var(--admin-muted, #70768a);
    font-size: 0.95rem;
    line-height: 1.5;
}

.cb-page-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 14px;
}

.cb-count-pill {
    padding: 8px 14px;
    border-radius: 999px;
    background: #f1effc;
    color: var(--pp-purple);
    font-size: 0.82rem;
    font-weight: 750;
    white-space: nowrap;
}

.cb-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

.cb-search {
    position: relative;
    flex: 1 1 320px;
    max-width: 420px;
}

.cb-search i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #9298a8;
    font-size: 0.85rem;
}

.cb-search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid #dde1eb;
    border-radius: 9px;
    background: #fff;
    color: #242630;
    font-size: 0.88rem;
}

.cb-search input:focus {
    border-color: var(--pp-purple);
    outline: none;
    box-shadow: 0 0 0 3px rgba(123, 106, 216, 0.14);
}

.cb-jump-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.cb-jump-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #e0e3ec;
    border-radius: 999px;
    background: #fff;
    color: #4c5263;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.cb-jump-chip:hover,
.cb-jump-chip:focus {
    border-color: var(--pp-purple);
    background: var(--pp-tint);
    color: #6959c5;
    text-decoration: none;
}

.cb-jump-chip span {
    padding: 1px 6px;
    border-radius: 999px;
    background: #f0f2f7;
    color: #858b9d;
    font-size: 0.7rem;
}

.cb-jump-chip:hover span {
    background: #fff;
    color: var(--pp-purple);
}

.cb-empty-search {
    display: none;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px dashed #d9dce6;
    border-radius: 10px;
    background: #fafbfe;
    color: #858b9d;
    text-align: center;
}

.cb-empty-search:not([hidden]) {
    display: block;
}

.cb-type-badge {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cb-type--text { background: #f1effc; color: var(--pp-purple); }
.cb-type--html { background: #e9f1ff; color: #4c7fd7; }
.cb-type--image { background: #e6f8f0; color: #24aa76; }
.cb-type--other { background: #f0f2f7; color: #626c84; }

.cb-group {
    padding: 0;
    margin-bottom: 14px;
    overflow: hidden;
}

.cb-group-heading {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border: 0;
    background: none;
    cursor: pointer;
    text-align: left;
}

.cb-group-heading-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cb-group-title {
    color: #25262e;
    font-size: 1.05rem;
    font-weight: 750;
}

.cb-group-count {
    color: var(--admin-muted, #858b9d);
    font-size: 0.85rem;
    font-weight: 600;
}

.cb-group-chevron {
    flex-shrink: 0;
    color: #9298a8;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.cb-group.is-open .cb-group-chevron {
    transform: rotate(180deg);
}

.cb-group-body {
    display: none;
    padding: 0 24px 22px;
}

.cb-group.is-open .cb-group-body {
    display: block;
}

.cb-group-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.cb-secondary-action {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid #dde1eb;
    border-radius: 8px;
    background: #fff;
    color: #4c5263;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cb-secondary-action:hover,
.cb-secondary-action:focus {
    border-color: var(--pp-purple);
    background: var(--pp-tint);
    color: #6959c5;
    text-decoration: none;
}

.cb-row-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cb-row {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid #eceef4;
}

.cb-row:first-child {
    border-top: 0;
    padding-top: 6px;
}

.cb-thumb {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 9px;
    object-fit: cover;
    background: #f0f2f7;
}

.cb-thumb--empty {
    color: #b2b6c2;
    font-size: 1.1rem;
}

.cb-thumb--lg {
    width: 100%;
    max-width: 320px;
    height: 180px;
    border-radius: 12px;
    font-size: 2rem;
}

.cb-row-text {
    min-width: 0;
}

.cb-row-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: #202129;
    font-size: 0.95rem;
    font-weight: 700;
}

.cb-slug {
    padding: 2px 7px;
    border-radius: 5px;
    background: #f0f2f7;
    color: #626c84;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 600;
}

.cb-row-preview {
    margin-top: 4px;
    color: #858b9d;
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.cb-row-preview--muted {
    font-style: italic;
}

.cb-has-previous {
    color: #d78a28;
    font-size: 0.72rem;
}

.cb-row-actions {
    display: flex;
    flex-shrink: 0;
    gap: 6px;
}

.cb-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid #dde1eb;
    border-radius: 7px;
    background: #fff;
    color: #4c5263;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cb-action-btn:hover,
.cb-action-btn:focus {
    border-color: var(--pp-purple);
    background: var(--pp-tint);
    color: #6959c5;
    text-decoration: none;
}

.cb-action-btn--danger:hover,
.cb-action-btn--danger:focus {
    border-color: #d64545;
    background: #fdecec;
    color: #c53030;
}

.cb-action-btn--icon {
    padding: 7px 9px;
}

.cb-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #6e758a;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.cb-back-link:hover,
.cb-back-link:focus {
    color: var(--pp-purple);
    text-decoration: none;
}

.cb-edit-page {
    max-width: 760px;
}

.cb-edit-card {
    padding: 32px;
}

.cb-edit-heading h1 {
    margin: 2px 0 8px;
    color: #202129;
    font-size: clamp(1.5rem, 2.6vw, 1.9rem);
    font-weight: 750;
}

.cb-restore-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin: 18px 0;
    border: 1px solid #fbe3b8;
    border-radius: 9px;
    background: #fff8ec;
    color: #8a6a1f;
    font-size: 0.85rem;
}

.cb-restore-note a {
    color: var(--pp-purple);
    font-weight: 700;
}

.cb-form {
    margin-top: 22px;
}

.cb-form .input {
    margin-bottom: 18px;
}

.cb-form label {
    display: block;
    margin-bottom: 6px;
    color: #4c5263;
    font-size: 0.82rem;
    font-weight: 750;
}

.cb-form input[type="text"],
.cb-form input[type="file"],
.cb-form textarea,
.cb-form select,
.cb-text-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d7dce7;
    border-radius: 8px;
    background: #fff;
    color: #242630;
    font-size: 0.9rem;
}

.cb-form input:focus,
.cb-form textarea:focus,
.cb-form select:focus {
    border-color: var(--pp-purple);
    outline: none;
    box-shadow: 0 0 0 3px rgba(123, 106, 216, 0.14);
}

.cb-field-hint {
    margin: -12px 0 18px;
    color: #9298a8;
    font-size: 0.76rem;
}

.cb-image-field {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.cb-image-preview-lg {
    max-width: 320px;
    max-height: 220px;
    border: 1px solid #e0e3ec;
    border-radius: 12px;
    object-fit: cover;
}

.cb-image-upload {
    flex: 1 1 220px;
    min-width: 220px;
}

.cb-form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
}

@media (max-width: 700px) {
    .cb-page-header {
        flex-direction: column;
    }

    .cb-page-actions {
        width: 100%;
        justify-content: space-between;
    }

    .cb-row {
        grid-template-columns: auto 1fr;
    }

    .cb-row-actions {
        grid-column: 1 / -1;
        flex-wrap: wrap;
    }

    .cb-image-field {
        flex-direction: column;
    }
}
