/* =========================================================
   DPC PORTAL — CLEAN + RESPONSIVE + MOBILE DRAWER FIX
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
    --dpcp-green: #127650;
    --dpcp-green2: #0b5d46;
    --dpcp-dark: #0b2e25;
    --dpcp-sidebar: #07261f;
    --dpcp-bg: #f6f7f8;
    --dpcp-card: #ffffff;
    --dpcp-muted: #7a8a86;
    --dpcp-border: #e8eeec;
    --dpcp-radius: 18px;
    --dpcp-shadow: 0 10px 30px rgba(0, 0, 0, .06);
    --dpcp-font: "Kanit";
}

/* ---------- Small utilities ---------- */
.dpcp-svg {
    width: 18px;
    height: 18px;
    display: block;
    filter: none;
}

.dpcp-muted {
    opacity: .8;
}

.dpcp-need-login {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--dpcp-border);
    border-radius: 12px;
}

.bell_search {
    display: flex;
    gap: 0.5rem;
    justify-content: end;
}

footer {
    display: none;
}

.bell_search_only_mobile .dpcp-searchbox {
    display: none;
    min-width: 100%;
    margin-bottom: 1rem;
}

/* =========================================================
   LOGIN
   ========================================================= */
.dpcp-login-wrap {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background:
        radial-gradient(circle at 20% 20%, rgba(14, 107, 76, .55), transparent 40%),
        radial-gradient(circle at 80% 40%, rgba(14, 107, 76, .35), transparent 45%),
        linear-gradient(180deg, #07261f 0%, #031915 100%);
}

.dpcp-login-card {
    width: min(540px, 100%);
    border-radius: 26px;
    padding: 36px 36px 28px;
    background: rgba(10, 60, 45, .75);
    box-shadow: 0 40px 80px rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(10px);
    color: #fff;
    font-family: var(--dpcp-font);
    text-align: center;
}

.dpcp-login-card h1 {
    margin: 0 0 8px;
    font-size: 34px;
    letter-spacing: .3px;
}

.dpcp-subtitle {
    margin: 0 0 22px;
    opacity: .8;
    font-size: 14px;
}

.dpcp-login-form label {
    display: block;
    font-size: 13px;
    opacity: .9;
    margin: 14px 0 8px;
    text-align: left;
}

.dpcp-login-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .95);
    outline: none;
}

.dpcp-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 11px;
}

.dpcp-link {
    color: #bce6d6;
    text-decoration: none;
    font-size: 13px;
}

.dpcp-link:hover {
    text-decoration: underline;
    color: white;
}

.dpcp-footer-note a.dpcp-link {
    font-size: 16px;
    color: white;
}

.dpcp-footer-note {
    margin-top: 18px;
    opacity: .85;
    text-align: center;
}

.dpcp-alert {
    /* background: rgba(255, 0, 0, .14); */
    /* border: 1px solid rgba(255, 0, 0, .25); */
    color: #fff;
    padding: 10px 12px;
    border-radius: 12px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.dpcp-btn {
    border: 0;
    border-radius: 14px;
    padding: 13px 16px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--dpcp-font);
}

.dpcp-btn-primary {
    background: var(--dpcp-green);
    margin-top: 18px;
    width: 100% !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border: none !important;
}

.dpcp-btn-primary:hover {
    filter: brightness(1.05);
}

/* =========================================================
   PORTAL LAYOUT
   ========================================================= */
.dpcp-portal {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 85vh;
    background: var(--dpcp-bg);
    font-family: var(--dpcp-font);
    overflow: hidden;
    box-shadow: var(--dpcp-shadow);
    position: relative;
}

/* ---------- Sidebar ---------- */
.dpcp-sidebar {
    background: #0D302A;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dpcp-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.dpcp-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 0 12px 12px 0;
    color: rgba(255, 255, 255, .88);
    text-decoration: none;
    font-weight: 400;
    position: relative;
}

.dpcp-nav-item:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.dpcp-nav-item:active {
    color: #fff;
}

.dpcp-nav-item .dpcp-ico {
    width: 22px;
    display: flex;
    justify-content: center;
}

.dpcp-nav-item.is-active {
    background: #fff;
    color: #0d2f26;
    border-left: 6px solid #127650;
}

.dpcp-nav-item.is-active .dpcp-svg {
    filter: brightness(.2);
}

.dpcp-badge {
    margin-left: auto;
    background: #127650;
    border-radius: 9px;
    color: #bce6d6;
    font-size: 12px;
    width: 27px;
    height: 27px;
    line-height: 27px;
    text-align: center;
}

.dpcp-nav-item.is-active .dpcp-badge {
    background: rgba(14, 107, 76, .12);
    color: var(--dpcp-green);
}

.dpcp-cta {
    margin-top: auto;
    background: rgb(18 118 80);
    border: none;
    border-radius: 18px;
    padding: 16px 14px;
    font-family: 'Kanit';
    color: #ffffff !important;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    opacity: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.dpcp-cta-plus {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .14);
    font-size: 18px;
}

.dpcp-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 14px;
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    margin-top: 10px;
}

.dpcp-logout:hover {
    background: rgba(255, 255, 255, .06);
    color: white;
}

/* ---------- Main ---------- */
.dpcp-main {
    padding: 22px 24px;
    background: #fff;
}

.dpcp-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.dpcp-topbar-left {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex-wrap: wrap;
}

.dpcp-page-title {
    margin: 0;
    font-size: 25px;
    color: #0d2f26;
}

.dpcp-page-sub {
    margin-top: 4px;
    color: #000;
    font-size: 12px;
}

.dpcp-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.dpcp-searchbox {
    position: relative;
    background: #fff;
    border: 1px solid #F2F2F2;
    border-radius: 12px;
    padding: 5px 10px 5px 25px;
    min-width: 260px;
}

.dpcp-searchbox.is-hidden {
    display: none;
}

.dpcp-searchbox input {
    border: 0 !important;
    outline: none;
    width: 100%;
}

.dpcp-search-ico {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .6;
}

.dpcp-userchip {
    background: #fff;
    border: 1px solid var(--dpcp-border);
    border-radius: 999px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #0d2f26;
}

.dpcp-userdot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dpcp-green);
}

/* =========================================================
   NOTIFICATIONS (BELL)
   ========================================================= */
.dpcp-bell {
    position: relative;
}

.dpcp-bell-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: #127650;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    border: none !important;
}

.dpcp-bell-count {
    position: absolute;
    right: -4px;
    top: -4px;
    background: #e53935;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--dpcp-bg);
}

.dpcp-bell-pop {
    position: absolute;
    right: 0;
    top: 52px;
    width: 360px;
    background: #fff;
    border: 1px solid var(--dpcp-border);
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .12);
    overflow: hidden;
    display: none;
    z-index: 50;
}

.dpcp-bell-pop.is-open {
    display: block;
}

.dpcp-bell-head {
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--dpcp-border);
}

.dpcp-bell-title {
    font-weight: 400;
    font-size: 19px;
    padding-bottom: 6px;
}

.dpcp-bell-tabs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.dpcp-tab {
    border: 1px solid #EAEAEA !important;
    background: #fff !important;
    padding: 0 12px !important;
    border-radius: 999px;
    font-weight: 400 !important;
    color: var(--dpcp-green) !important;
}

.dpcp-tab.is-active {
    background: var(--dpcp-green) !important;
    border-color: rgba(14, 107, 76, .22);
    color: white !important;
}

.dpcp-bell-list {
    padding: 0;
}

.dpcp-notif {
    display: grid;
    grid-template-columns: 32px 1fr 42px;
    gap: 10px;
    padding: 12px 8px;
    border-radius: 0;
    cursor: pointer;
    border-bottom: 1px solid #EAEAEA;
    position: relative;
}

.dpcp-notif:hover {
    background: #f6faf8;
}

.dpcp-notif:hover::after {
    background: #127650;
    content: '';
    position: absolute;
    width: 4px;
    height: 100%;
}

.dpcp-notif-ico {
    width: 35px;
    height: 35px;
    border-radius: 12px;
    background: rgba(14, 107, 76, .10);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dpcp-green);
    font-weight: 900;
}

.dpcp-notif-ico svg {
    width: 19px;
}

.dpcp-notif-title {
    font-weight: 500;
    font-size: 14px;
}

.dpcp-notif-msg {
    color: var(--dpcp-muted);
    font-size: 12px;
    margin-top: 3px;
}

.dpcp-notif-time {
    color: var(--dpcp-muted);
    font-size: 12px;
    text-align: right;
}

/* =========================================================
   CONTENT + STATES
   ========================================================= */
.dpcp-content {
    padding-top: 6px;
}

.dpcp-empty {
    padding: 18px;
    background: #fff;
    border: 1px solid var(--dpcp-border);
    border-radius: 16px;
    color: var(--dpcp-muted);
}

/* =========================================================
   DASHBOARD
   ========================================================= */
.dpcp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    min-width: 0;
}

.dpcp-stat {
    border-radius: 32px;
    padding: 18px 18px 16px;
    background: #127650;
    color: #fff;
    box-shadow: var(--dpcp-shadow);
    position: relative;
    overflow: hidden;
}

.dpcp-stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.dpcp-stat-title {
    font-weight: 400;
    font-size: 18px;
}

.dpcp-stat-ico {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.values-container {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-direction: row-reverse;
}

.dpcp-stat-value {
    font-size: 30px;
    font-weight: 400;
    margin-top: 12px;
    margin-right: 10px;
}

.dpcp-stat-sub {
    opacity: .85;
    font-size: 14px;
    margin-top: 4px;
    font-weight: 400;
}

.dpcp-section {
    margin-top: 50px;
}

.dpcp-section-title {
    font-size: 25px;
    font-weight: 400;
    color: #0D302A;
}

.dpcp-section-sub {
    color: #000;
    font-size: 13px;
    margin-top: 4px;
}

.dpcp-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.dpcp-card-mini {
    background: #EAEAEA;
    border: 1px solid var(--dpcp-border);
    border-radius: 16px;
    padding: 14px;
}

.dpcp-card-mini-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dpcp-mini-muted {
    color: #232020;
    font-size: 11px;
    letter-spacing: .2px;
    font-weight: 400;
}

.dpcp-mini-date {
    color: #232020;
    font-size: 11px;
}

.dpcp-mini-title {
    margin-top: 10px;
    font-weight: 400;
}

.dpcp-mini-status {
    margin-top: 10px;
    padding: 6px 10px;
    background: #127650;
    border-radius: 10px;
    color: #fff;
    font-weight: 500;
    font-size: 12px;
    max-width: 170px;
    text-align: center;
}

/* =========================================================
   TABS (COMMANDES)
   ========================================================= */
.dpcp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.dpcp-tabpill {
    font-family: var(--dpcp-font) !important;
    font-weight: 400 !important;
    font-size: 14px;
    background: #E4ECE1 !important;
    border: none !important;
    color: #0D302A !important;
    padding: 12px 30px !important;
    min-width: 141px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dpcp-tabpill.is-active {
    background: var(--dpcp-green) !important;
    color: #fff !important;
    font-weight: 600;
}

/* =========================================================
   TABLE (FACTURES)
   ========================================================= */
.dpcp-tablecard {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--dpcp-shadow);
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.dpcp-tablewrap {
    overflow: auto;
}

.dpcp-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 0;
}

.dpcp-table thead th {
    background: #127650;
    color: #fff;
    text-align: left;
    font-weight: 400;
    padding: 14px 14px;
    font-size: 14px;
    border: none;
    vertical-align: middle;
}

.dpcp-table thead th:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    padding-left: 28px;
}

.dpcp-table thead th:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    padding-right: 28px;
}

.dpcp-table tbody td {
    padding: 14px 14px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    border: none;
    line-height: normal;
    vertical-align: middle;
}

.dpcp-table tbody td strong {
    font-weight: 500;
}

.dpcp-td-empty {
    color: var(--dpcp-muted);
    text-align: center;
}

.dpcp-td-right {
    text-align: right;
}

.dpcp-status-green {
    color: var(--dpcp-green);
    font-weight: 600;
}

.dpcp-dl {
    display: inline-flex;
    /* width: 36px; */
    /* height: 36px; */
    /* border-radius: 12px; */
    align-items: center;
    justify-content: center;
    /* border: 1px solid var(--dpcp-border); */
    text-decoration: none;
}

.dpcp-dl:hover {
    /* background: #f6faf8; */
}

/* Sorting */
.dpcp-sort {
    background: none;
    border: 0 !important;
    padding: 0 !important;
    font: inherit;
    cursor: pointer !important;
    display: inline-flex !important;
    gap: 8px;
    align-items: center;
    font-weight: 400 !important;
    color: inherit;
}

.dpcp-sort[aria-sort="ascending"] .dpcp-sort-ico {
    transform: rotate(180deg);
}

.dpcp-sort:hover {
    background: none !important;
}

.dpcp-table {
    --dpcp-cols: 5;
    /* number of columns */
    table-layout: fixed;
    /* ✅ prevents content-based widths */
}

/* ✅ equal width columns on desktop */
.dpcp-table th,
.dpcp-table td {
    width: calc(100% / var(--dpcp-cols));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   PROFILE
   ========================================================= */
.dpcp-card {
    background: #eeeeee42;
    border: 1px solid var(--dpcp-border);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
}

.dpcp-card-title {
    font-weight: 600;
    margin-bottom: 30px;
}

.dpcp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dpcp-field label {
    display: block;
    font-size: 13px;
    color: #0d2f26;
    font-weight: 400;
    margin-bottom: 8px;
}

body .dpcp-field input {
    width: 100% !important;
    border: 1px solid var(--dpcp-border);
    border-radius: 14px;
    padding: 12px 14px;
    outline: none;
}

.dpcp-field input:disabled {
    background: #f5f7f6;
}

.dpcp-phone {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
}

.dpcp-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.dpcp-actions .dpcp-btn-primary {
    width: auto;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 400;
}

.dpcp-toast {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--dpcp-border);
    background: #fff;
    color: #0d2f26;
    font-weight: 700;
}

.dpcp-toast.is-ok {
    border-color: rgba(14, 107, 76, .22);
    background: rgba(14, 107, 76, .08);
    color: var(--dpcp-green);
}

/* =========================================================
   PAGINATION
   ========================================================= */
.dpcp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 0 15px;
}

.dpcp-page-btn,
.dpcp-page-num {
    border: none !important;
    background: #CFE4DC !important;
    width: 34px !important;
    height: 34px;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
}

.dpcp-page-num.is-active {
    background: #127650 !important;
    color: white;
}

.dpcp-page-numbers {
    display: flex;
    gap: 8px;
}

/* =========================================================
   MOBILE MENU (BURGER + OVERLAY + DRAWER)
   IMPORTANT: No global display:none !important here
   ========================================================= */

/* Hidden by default on desktop */
.dpcp-burger,
.dpcp-close,
.dpcp-overlay {
    display: none;
}

.dpcp-burger {
    width: 44px;
    height: 36px;
    border-radius: 12px;
    border: 0;
    background: #127650;
    cursor: pointer;
    position: relative;
    align-items: center;
    justify-content: center;
}

.dpcp-burger span {
    display: block;
    height: 2px;
    width: 20px;
    background: #fff;
    margin: 5px auto;
    border-radius: 2px;
}

.dpcp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 90;
}

.dpcp-close {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 0;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 26px;
    line-height: 44px;
    cursor: pointer;
    margin-bottom: 10px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1200px) {
    .dpcp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dpcp-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .dpcp-portal {
        grid-template-columns: 240px 1fr;
    }

    .dpcp-searchbox {
        min-width: 220px;
    }

    .dpcp-alert {
        margin-bottom: 1.5rem
    }
}

/* Mobile drawer breakpoint */
@media (max-width: 860px) {
    .dpcp-portal {
        display: block;
    }

    .dpcp-main {
        padding: 0;
    }


    .dpcp-content,
    .dpcp-topbar-left {
        padding: 16px;
    }

    /* topbar stacks */
    .dpcp-topbar {
        flex-direction: column;
        align-items: stretch;
        flex-direction: column-reverse;
        margin-bottom: 0;
    }

    .dpcp-topbar-right {
        justify-content: space-between;
        background: #127650;
        padding: 0.5rem;
    }

    /* show burger */
    .dpcp-burger {
        display: inline-flex;
    }

    /* overlay only when open */
    .dpcp-portal.is-menu-open .dpcp-overlay {
        display: block;
    }

    /* Sidebar becomes drawer */
    .dpcp-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: min(320px, 86vw);
        z-index: 100;

        flex-direction: column;
        align-items: stretch;
        overflow-y: auto;

        transform: translateX(-110%);
        transition: transform .25s ease;
        box-shadow: 0 25px 80px rgba(0, 0, 0, .35);
    }

    .dpcp-portal.is-menu-open .dpcp-sidebar {
        transform: translateX(0);
    }

    .dpcp-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .dpcp-nav {
        flex-direction: column;
        gap: 8px;
        margin-top: 4px;
    }

    .dpcp-nav-item {
        border-radius: 14px;
        white-space: normal;
    }

    .dpcp-cta {
        margin-top: auto;
    }

    .dpcp-logout {
        margin-top: 10px;
    }

    .dpcp-bell-pop {
        left: -193px;
        border: 0;
        border-radius: 0;
    }

    .dpcp-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;

        width: 100%;
        max-width: 100%;
        min-width: 0;
        /* important in flex layouts */
        box-sizing: border-box;

        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;

        padding: 0 0 10px;
    }

    .dpcp-tabs>.dpcp-tabpill {
        flex: 0 0 auto;
        white-space: nowrap;
        max-width: 100%;
    }

    /* invoice table */
    .dpcp-tablewrap {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
        /* keeps scrollbar space when needed */
    }

    .dpcp-table {
        width: max-content;
        /* lets the table grow wider than viewport */
        min-width: calc(150px * var(--dpcp-cols));
    }

    .dpcp-table th,
    .dpcp-table td {
        width: 150px;
        min-width: 150px;
    }

    .dpcp-topbar-left {
        padding-bottom: 0px
    }
}

@media (max-width: 640px) {
    .dpcp-footer-note {
        display: flex;
        flex-direction: column;
    }

    .dpcp-login-card h1 {
        font-size: 28px;
    }

    .dpcp-searchbox {
        min-width: 0;
        width: 170px;
        padding: 1px 23px;
        display: none;
    }

    .dpcp-cards {
        grid-template-columns: 1fr;
    }

    .dpcp-form-grid {
        grid-template-columns: 1fr;
    }

    .dpcp-bell-pop {
        width: min(360px, 92vw);
    }

    .dpcp-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .bell_search_only_mobile .dpcp-searchbox {
        display: block;
    }
}

@media (max-width: 450px) {
    .x-width-input {
        margin-right: 0 !important;
    }

    .dpcp-row-between {
        flex-wrap: wrap;
    }
}

/* =========================================================
   FIX: Burger/Close visibility + Close hidden behind header
   Put this at the END of the CSS file
   ========================================================= */

/* Desktop default: NEVER show burger/close/overlay */
.dpcp-portal .dpcp-burger,
.dpcp-portal .dpcp-close,
.dpcp-portal .dpcp-overlay {
    display: none !important;
}

/* Ensure drawer is always above theme header */


.dpcp-portal .dpcp-overlay {
    z-index: 999998 !important;
}

/* FIX burger icon (3 lines stacked nicely) */
.dpcp-portal .dpcp-burger {
    display: inline-flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 0 !important;
    line-height: 0 !important;
    width: 40px;
    border: none;
    /* margin-bottom: 1rem; */
    display: none !important;
}

.dpcp-portal .dpcp-burger span {
    margin: 0 !important;
    width: 19px !important;
    height: 2px !important;
    background: #fff !important;
    border-radius: 2px !important;
    display: block !important;
}

/* Mobile */
@media (max-width: 860px) {
    .dpcp-portal .dpcp-sidebar {
        z-index: 999999 !important;
    }

    /* Show burger on mobile */
    .dpcp-portal .dpcp-burger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Overlay only when open */
    .dpcp-portal .dpcp-overlay {
        display: none !important;
    }

    .dpcp-portal.is-menu-open .dpcp-overlay {
        display: block !important;
    }

    /* Close button only when open (so it won't appear on desktop or closed state) */
    .dpcp-portal .dpcp-close {
        display: none !important;
    }

    .dpcp-portal.is-menu-open .dpcp-close {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;

        /* keep it visible even when scrolling */
        position: sticky;
        top: 12px;

        /* make sure it sits above sidebar content */
        border: none;
        width: 50px;
        height: 50px;
        z-index: 1000000;

        /* push it to the right */
        font-family: 'Kanit';
        font-size: 35px;
        font-weight: 400;
        margin-left: auto;

        /* stronger visibility */
        background: #127650;
        color: #fff;
        box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
        padding-top: 10px;
    }

    /* Give breathing room so close isn't glued under a fixed site header */
    .dpcp-portal .dpcp-sidebar {
        padding-top: 14px !important;
    }

    .dpcp-userchip {
        background: none;
        color: white;
        border: 0;
        padding: 0;
    }

    .dpcp-userdot {
        background: lightgreen;
    }
}