/**
 * =====================================================
 * CPCS GLOBAL MODAL DESIGN SYSTEM — V1
 * =====================================================
 * Visual-only standardisation layer.
 * Mirrors the approved New/Edit Project modal language.
 * Existing modal IDs, controls, handlers and workflows are untouched.
 */

:root{
    --cpcs-modal-blue-1:#0b5ed7;
    --cpcs-modal-blue-2:#1677ea;
    --cpcs-modal-blue-3:#3b8ff3;
    --cpcs-modal-navy:#0f172a;
    --cpcs-modal-text:#334155;
    --cpcs-modal-muted:#64748b;
    --cpcs-modal-border:#d8e0ea;
    --cpcs-modal-soft:#f8fafc;
}

/* Backdrops ------------------------------------------------------------ */
body .ph-modal-overlay,
body .site-diary-modal-overlay,
body .subscription-modal-backdrop,
body .pc-modal-backdrop{
    background:rgba(15,23,42,.48) !important;
    -webkit-backdrop-filter:blur(8px) !important;
    backdrop-filter:blur(8px) !important;
    padding:24px !important;
    animation:cpcsModalBackdropIn .18s ease-out;
}

body .subscription-modal-backdrop[hidden]{
    display:none !important;
}

/* Modal panels --------------------------------------------------------- */
body .ph-modal-overlay > .ph-modal,
body .ph-modal-overlay > .ph-details-modal,
body .site-diary-modal-overlay > .site-diary-modal,
body .subscription-modal-backdrop > .subscription-modal{
    background:#fff !important;
    border:1px solid rgba(148,163,184,.28) !important;
    border-radius:20px !important;
    box-shadow:
        0 28px 70px rgba(15,23,42,.20),
        0 8px 24px rgba(15,23,42,.10) !important;
    animation:cpcsModalPanelIn .20s cubic-bezier(.2,.8,.2,1);
}

/* Keep each module's deliberate width/max-height; only make it viewport-safe. */
body .ph-modal-overlay > .ph-modal,
body .ph-modal-overlay > .ph-details-modal,
body .site-diary-modal-overlay > .site-diary-modal,
body .subscription-modal-backdrop > .subscription-modal{
    max-width:calc(100vw - 32px) !important;
}

/* Headers -------------------------------------------------------------- */
body .ph-modal-header,
body .site-diary-modal-header,
body .cpcs-subscription-modal-header{
    position:relative !important;
    display:flex !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:20px !important;
    padding:26px 28px 24px !important;
    overflow:hidden !important;
    color:#fff !important;
    background:
        radial-gradient(circle at 86% 20%,rgba(255,255,255,.18),transparent 34%),
        linear-gradient(135deg,var(--cpcs-modal-blue-1) 0%,var(--cpcs-modal-blue-2) 58%,var(--cpcs-modal-blue-3) 100%) !important;
    border:0 !important;
    border-radius:19px 19px 0 0 !important;
}

body .ph-modal-header::after,
body .site-diary-modal-header::after,
body .cpcs-subscription-modal-header::after{
    content:"";
    position:absolute;
    right:-72px;
    bottom:-92px;
    width:220px;
    height:220px;
    border:1px solid rgba(255,255,255,.15);
    border-radius:50%;
    box-shadow:
        0 0 0 34px rgba(255,255,255,.055),
        0 0 0 68px rgba(255,255,255,.035);
    pointer-events:none;
}

body .cpcs-modal-heading,
body .cost-ledger-modal-heading{
    position:relative;
    z-index:1;
    display:flex !important;
    align-items:flex-start !important;
    gap:15px !important;
    min-width:0;
}

body .cpcs-modal-icon,
body .cost-ledger-modal-icon{
    flex:0 0 auto;
    display:grid !important;
    place-items:center !important;
    width:44px !important;
    height:44px !important;
    margin-top:1px;
    color:#fff !important;
    border:1px solid rgba(255,255,255,.24) !important;
    border-radius:13px !important;
    background:rgba(255,255,255,.14) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.14) !important;
}

body .cpcs-modal-icon svg,
body .cost-ledger-modal-icon svg{
    width:21px !important;
    height:21px !important;
    stroke-width:2 !important;
}

body .cpcs-modal-title-copy{
    min-width:0;
}

body .ph-modal-header small,
body .site-diary-modal-header small,
body .cpcs-subscription-modal-header small,
body .cpcs-subscription-modal-header .section-kicker{
    display:block !important;
    margin:0 0 5px !important;
    color:rgba(255,255,255,.74) !important;
    font-size:10px !important;
    line-height:1.2 !important;
    font-weight:800 !important;
    letter-spacing:.14em !important;
    text-transform:uppercase !important;
}

body .ph-modal-header h2,
body .ph-modal-header h3,
body .site-diary-modal-header h2,
body .site-diary-modal-header h3,
body .cpcs-subscription-modal-header h2{
    margin:0 !important;
    color:#fff !important;
    font-size:23px !important;
    line-height:1.2 !important;
    font-weight:750 !important;
    letter-spacing:-.02em !important;
}

body .ph-modal-header p,
body .site-diary-modal-header p,
body .cpcs-subscription-modal-header p,
body .cpcs-modal-description{
    max-width:560px;
    margin:7px 0 0 !important;
    color:rgba(255,255,255,.79) !important;
    font-size:13px !important;
    line-height:1.55 !important;
}

/* Close buttons -------------------------------------------------------- */
body .ph-modal-close,
body .site-diary-modal-close,
body .subscription-modal-close{
    position:relative !important;
    z-index:2 !important;
    top:auto !important;
    right:auto !important;
    flex:0 0 auto !important;
    display:grid !important;
    place-items:center !important;
    width:38px !important;
    height:38px !important;
    padding:0 !important;
    color:#fff !important;
    background:rgba(255,255,255,.12) !important;
    border:1px solid rgba(255,255,255,.22) !important;
    border-radius:11px !important;
    cursor:pointer !important;
    transition:transform .16s ease,background .16s ease,border-color .16s ease !important;
}

body .ph-modal-close:hover,
body .site-diary-modal-close:hover,
body .subscription-modal-close:hover{
    transform:translateY(-1px) !important;
    background:rgba(255,255,255,.22) !important;
    border-color:rgba(255,255,255,.34) !important;
}

body .ph-modal-close:focus-visible,
body .site-diary-modal-close:focus-visible,
body .subscription-modal-close:focus-visible{
    outline:3px solid rgba(255,255,255,.40) !important;
    outline-offset:2px !important;
}

body .ph-modal-close svg,
body .site-diary-modal-close svg,
body .subscription-modal-close svg{
    width:18px !important;
    height:18px !important;
}

/* Main modal content --------------------------------------------------- */
body .ph-modal > .ph-modal-body,
body .ph-details-modal > .ph-details-body,
body .site-diary-modal > .site-diary-modal-body{
    background:#fff !important;
}

body .cpcs-subscription-modal-body{
    padding:24px 28px 28px !important;
    background:#fff;
}

/* Form labels + controls ---------------------------------------------- */
body .ph-form-field label,
body .site-diary-form-field label,
body .subscription-note-field > span{
    display:flex;
    align-items:center;
    gap:5px;
    margin:0 0 8px !important;
    color:var(--cpcs-modal-text) !important;
    font-size:12px !important;
    line-height:1.25 !important;
    font-weight:750 !important;
    letter-spacing:.01em !important;
}

body .ph-form-field input,
body .ph-form-field select,
body .ph-form-field textarea,
body .site-diary-form-field input,
body .site-diary-form-field select,
body .site-diary-form-field textarea,
body .subscription-note-field textarea{
    box-sizing:border-box !important;
    width:100% !important;
    min-height:46px;
    padding:11px 13px !important;
    color:var(--cpcs-modal-navy) !important;
    background:#fff !important;
    border:1px solid var(--cpcs-modal-border) !important;
    border-radius:11px !important;
    outline:none !important;
    font:inherit !important;
    font-size:13px !important;
    line-height:1.4 !important;
    box-shadow:0 1px 2px rgba(15,23,42,.025) !important;
    transition:border-color .16s ease,box-shadow .16s ease,background .16s ease !important;
}

body .ph-form-field textarea,
body .site-diary-form-field textarea,
body .subscription-note-field textarea{
    min-height:92px;
    resize:vertical;
}

body .ph-form-field input:hover,
body .ph-form-field select:hover,
body .ph-form-field textarea:hover,
body .site-diary-form-field input:hover,
body .site-diary-form-field select:hover,
body .site-diary-form-field textarea:hover,
body .subscription-note-field textarea:hover{
    border-color:#b9c8da !important;
}

body .ph-form-field input:focus,
body .ph-form-field select:focus,
body .ph-form-field textarea:focus,
body .site-diary-form-field input:focus,
body .site-diary-form-field select:focus,
body .site-diary-form-field textarea:focus,
body .subscription-note-field textarea:focus{
    border-color:#1677ea !important;
    box-shadow:0 0 0 4px rgba(22,119,234,.10) !important;
}

body .ph-form-field input[readonly],
body .site-diary-form-field input[readonly]{
    color:#64748b !important;
    background:#f8fafc !important;
    border-style:dashed !important;
}

/* Section cards inside the larger Site Diary / Meeting / Risk modals. */
body .site-diary-form-section{
    border-color:#e5ebf3 !important;
    border-radius:15px !important;
    background:#fff !important;
    box-shadow:0 1px 2px rgba(15,23,42,.02) !important;
}

body .site-diary-section-number{
    color:#1d4ed8 !important;
    background:#eff6ff !important;
    border:1px solid #bfdbfe !important;
}

/* Details/summary cards ------------------------------------------------ */
body .ph-detail-item,
body .ph-approval-summary,
body .ph-calculation-preview,
body .subscription-modal-total{
    border-color:#e2e8f0 !important;
    border-radius:12px !important;
    background:#f8fafc !important;
}

/* Footers -------------------------------------------------------------- */
body .ph-modal-footer,
body .site-diary-modal-footer{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:12px !important;
    padding:18px 28px !important;
    background:#f8fafc !important;
    border-top:1px solid #e7edf4 !important;
    border-radius:0 0 19px 19px !important;
}

body .site-diary-modal-footer{
    justify-content:space-between !important;
}

/* Secondary actions --------------------------------------------------- */
body .ph-secondary-btn,
body .site-diary-footer-secondary{
    min-height:42px !important;
    padding:10px 16px !important;
    color:#334155 !important;
    background:#fff !important;
    border:1px solid #d8e0ea !important;
    border-radius:11px !important;
    font-size:12px !important;
    font-weight:750 !important;
    box-shadow:0 1px 2px rgba(15,23,42,.025) !important;
    transition:transform .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease !important;
}

body .ph-secondary-btn:hover,
body .site-diary-footer-secondary:hover{
    transform:translateY(-1px);
    color:#1d4ed8 !important;
    background:#f8fbff !important;
    border-color:#bfdbfe !important;
}

/* Primary actions ----------------------------------------------------- */
body .ph-primary-btn,
body .site-diary-footer-primary,
body .subscription-submit-btn{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    min-height:42px !important;
    padding:10px 17px !important;
    color:#fff !important;
    background:linear-gradient(135deg,#0b5ed7,#1677ea) !important;
    border:1px solid #0b5ed7 !important;
    border-radius:11px !important;
    font-size:12px !important;
    font-weight:800 !important;
    box-shadow:0 8px 18px rgba(22,119,234,.18) !important;
    transition:transform .16s ease,filter .16s ease,box-shadow .16s ease !important;
}

body .ph-primary-btn:hover,
body .site-diary-footer-primary:hover,
body .subscription-submit-btn:hover{
    transform:translateY(-1px) !important;
    filter:brightness(.985) !important;
    box-shadow:0 11px 22px rgba(22,119,234,.23) !important;
}

body .ph-primary-btn:active,
body .ph-secondary-btn:active,
body .site-diary-footer-primary:active,
body .site-diary-footer-secondary:active,
body .subscription-submit-btn:active{
    transform:translateY(0) !important;
}

body .ph-primary-btn:focus-visible,
body .ph-secondary-btn:focus-visible,
body .site-diary-footer-primary:focus-visible,
body .site-diary-footer-secondary:focus-visible,
body .subscription-submit-btn:focus-visible{
    outline:3px solid rgba(37,99,235,.20) !important;
    outline-offset:2px !important;
}

body .ph-primary-btn svg,
body .ph-secondary-btn svg,
body .site-diary-footer-primary svg,
body .site-diary-footer-secondary svg,
body .subscription-submit-btn svg{
    width:15px !important;
    height:15px !important;
}

/* Subscription payment options --------------------------------------- */
body .cpcs-subscription-modal-body .subscription-payment-options{
    margin:0 0 18px !important;
}

body .cpcs-subscription-modal-body .payment-option{
    padding:13px !important;
    border:1px solid #d8e0ea !important;
    border-radius:12px !important;
    background:#fff !important;
    transition:border-color .16s ease,background .16s ease,box-shadow .16s ease !important;
}

body .cpcs-subscription-modal-body .payment-option.selected{
    border-color:#93c5fd !important;
    background:#f8fbff !important;
    box-shadow:0 0 0 3px rgba(37,99,235,.06) !important;
}

body .cpcs-subscription-modal-body .payment-icon{
    border-radius:11px !important;
    background:#eff6ff !important;
    color:#2563eb !important;
}

body .cpcs-subscription-modal-body .subscription-modal-total{
    margin:16px 0 !important;
    padding:14px !important;
}

body .cpcs-subscription-modal-body .subscription-submit-btn{
    width:100% !important;
    min-height:46px !important;
}

/* Scrollbars ---------------------------------------------------------- */
body .ph-modal,
body .ph-details-modal,
body .site-diary-modal,
body .subscription-modal{
    scrollbar-width:thin;
    scrollbar-color:#cbd5e1 transparent;
}

body .ph-modal::-webkit-scrollbar,
body .ph-details-modal::-webkit-scrollbar,
body .site-diary-modal::-webkit-scrollbar,
body .subscription-modal::-webkit-scrollbar{
    width:8px;
}

body .ph-modal::-webkit-scrollbar-thumb,
body .ph-details-modal::-webkit-scrollbar-thumb,
body .site-diary-modal::-webkit-scrollbar-thumb,
body .subscription-modal::-webkit-scrollbar-thumb{
    background:#cbd5e1;
    border-radius:999px;
}

/* Keep the command/search palette visually related without turning it
   into a form modal. */
body .cpcs-search-overlay{
    background:rgba(15,23,42,.48) !important;
    -webkit-backdrop-filter:blur(8px) !important;
    backdrop-filter:blur(8px) !important;
}

body .cpcs-search-palette{
    border:1px solid rgba(148,163,184,.28) !important;
    border-radius:18px !important;
    box-shadow:0 28px 70px rgba(15,23,42,.20),0 8px 24px rgba(15,23,42,.10) !important;
}

@keyframes cpcsModalBackdropIn{
    from{opacity:0}
    to{opacity:1}
}

@keyframes cpcsModalPanelIn{
    from{opacity:0;transform:translateY(8px) scale(.988)}
    to{opacity:1;transform:translateY(0) scale(1)}
}

@media(max-width:720px){
    body .ph-modal-overlay,
    body .site-diary-modal-overlay,
    body .subscription-modal-backdrop,
    body .pc-modal-backdrop{
        padding:12px !important;
        align-items:flex-end !important;
    }

    body .ph-modal-overlay > .ph-modal,
    body .ph-modal-overlay > .ph-details-modal,
    body .site-diary-modal-overlay > .site-diary-modal,
    body .subscription-modal-backdrop > .subscription-modal{
        max-width:100% !important;
        max-height:92vh !important;
        border-radius:18px !important;
    }

    body .ph-modal-header,
    body .site-diary-modal-header,
    body .cpcs-subscription-modal-header{
        padding:21px 20px 19px !important;
        gap:12px !important;
        border-radius:17px 17px 0 0 !important;
    }

    body .cpcs-modal-icon,
    body .cost-ledger-modal-icon{
        width:40px !important;
        height:40px !important;
        border-radius:12px !important;
    }

    body .ph-modal-header h2,
    body .ph-modal-header h3,
    body .site-diary-modal-header h2,
    body .site-diary-modal-header h3,
    body .cpcs-subscription-modal-header h2{
        font-size:20px !important;
    }

    body .ph-modal-header p,
    body .site-diary-modal-header p,
    body .cpcs-subscription-modal-header p,
    body .cpcs-modal-description{
        font-size:12px !important;
    }

    body .ph-modal-footer,
    body .site-diary-modal-footer{
        padding:15px 18px !important;
        align-items:stretch !important;
        flex-direction:column !important;
    }

    body .site-diary-footer-actions{
        width:100% !important;
        display:grid !important;
        grid-template-columns:1fr !important;
    }

    body .ph-modal-footer .ph-primary-btn,
    body .ph-modal-footer .ph-secondary-btn,
    body .site-diary-modal-footer button{
        width:100% !important;
        min-height:46px !important;
    }

    body .cpcs-subscription-modal-body{
        padding:20px !important;
    }
}

@media(prefers-reduced-motion:reduce){
    body .ph-modal-overlay,
    body .site-diary-modal-overlay,
    body .subscription-modal-backdrop,
    body .pc-modal-backdrop,
    body .ph-modal,
    body .ph-details-modal,
    body .site-diary-modal,
    body .subscription-modal{
        animation:none !important;
    }
}

/* =====================================================================
   COST LEDGER — PORTRAIT COMMERCIAL CONTROL DIALOG
   =====================================================================
   Applied only when modal-system.js identifies the dedicated Cost Ledger
   transaction dialog. No cost calculations or persistence logic changes.
*/
body .ph-modal-overlay > .cpcs-cost-ledger-portrait{
    width:min(640px,calc(100vw - 36px)) !important;
    max-width:min(640px,calc(100vw - 36px)) !important;
    max-height:min(90vh,880px) !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
}

body .cpcs-cost-ledger-portrait > .ph-modal-header{
    padding:24px 26px 22px !important;
}

body .cpcs-cost-ledger-portrait .cpcs-modal-description{
    max-width:430px !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-transaction-section,
body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section{
    margin:20px 22px 0 !important;
    padding:18px !important;
    border:1px solid #dfe7f1 !important;
    border-radius:15px !important;
    background:#fff !important;
    box-shadow:0 1px 2px rgba(15,23,42,.025) !important;
    overflow:hidden !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section{
    margin-bottom:22px !important;
}

body .cpcs-cost-ledger-portrait .cpcs-ledger-section-kicker{
    color:#1d4ed8 !important;
    font-size:10px !important;
    line-height:1.2 !important;
    font-weight:850 !important;
    letter-spacing:.12em !important;
    text-transform:uppercase !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:15px 14px !important;
    width:100% !important;
    min-width:0 !important;
    margin-top:14px !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field{
    min-width:0 !important;
    width:100% !important;
    margin:0 !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field--wide{
    grid-column:1 / -1 !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field label,
body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field .label,
body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field > span:first-child{
    display:block !important;
    margin:0 0 7px !important;
    color:#475569 !important;
    font-size:11px !important;
    line-height:1.25 !important;
    font-weight:800 !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field input,
body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field select,
body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field textarea{
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    min-height:46px !important;
    padding:11px 12px !important;
    color:#0f172a !important;
    background:#fff !important;
    border:1px solid #d8e0ea !important;
    border-radius:11px !important;
    outline:none !important;
    font:inherit !important;
    font-size:12.5px !important;
    box-shadow:0 1px 2px rgba(15,23,42,.025) !important;
    transition:border-color .16s ease,box-shadow .16s ease,background .16s ease !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field input:focus,
body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field select:focus,
body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field textarea:focus{
    border-color:#1677ea !important;
    box-shadow:0 0 0 4px rgba(22,119,234,.10) !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-add-transaction{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:9px !important;
    width:100% !important;
    min-height:48px !important;
    margin-top:16px !important;
    padding:11px 18px !important;
    color:#fff !important;
    background:linear-gradient(135deg,#0b5ed7 0%,#1677ea 100%) !important;
    border:1px solid #0b5ed7 !important;
    border-radius:12px !important;
    font-size:12.5px !important;
    font-weight:850 !important;
    letter-spacing:.005em !important;
    box-shadow:0 9px 20px rgba(22,119,234,.21) !important;
    cursor:pointer !important;
    transition:transform .16s ease,box-shadow .16s ease,filter .16s ease !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-add-transaction:hover{
    transform:translateY(-1px) !important;
    box-shadow:0 12px 25px rgba(22,119,234,.27) !important;
    filter:brightness(.99) !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-add-transaction:active{
    transform:translateY(0) !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-add-transaction:focus-visible{
    outline:3px solid rgba(37,99,235,.20) !important;
    outline-offset:3px !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-add-transaction svg{
    width:17px !important;
    height:17px !important;
    stroke-width:2.2 !important;
}

/* Turn the wide ledger table into readable portrait transaction cards. */
body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section table{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    margin-top:12px !important;
    border:0 !important;
    background:transparent !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section thead{
    display:none !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section tbody{
    display:grid !important;
    gap:10px !important;
    width:100% !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section tbody tr{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px 14px !important;
    width:100% !important;
    padding:13px 14px !important;
    border:1px solid #e2e8f0 !important;
    border-radius:12px !important;
    background:#f8fafc !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section tbody td{
    display:block !important;
    min-width:0 !important;
    padding:0 !important;
    color:#0f172a !important;
    border:0 !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    font-size:11.5px !important;
    line-height:1.45 !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section tbody td[data-cpcs-ledger-label]::before{
    content:attr(data-cpcs-ledger-label);
    display:block;
    margin-bottom:3px;
    color:#64748b;
    font-size:9px;
    line-height:1.2;
    font-weight:850;
    letter-spacing:.07em;
    text-transform:uppercase;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section tbody td.cpcs-ledger-empty-state{
    grid-column:1 / -1 !important;
    padding:4px 0 !important;
    color:#64748b !important;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section tbody td.cpcs-ledger-empty-state::before{
    display:none !important;
}

/* Kill the landscape scrollbar on this modal only. */
body .cpcs-cost-ledger-portrait,
body .cpcs-cost-ledger-portrait *{
    max-inline-size:100%;
}

body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-transaction-section,
body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section,
body .cpcs-cost-ledger-portrait table,
body .cpcs-cost-ledger-portrait tbody{
    overflow-x:hidden !important;
}

@media(max-width:720px){
    body .ph-modal-overlay > .cpcs-cost-ledger-portrait{
        width:100% !important;
        max-width:100% !important;
        max-height:92vh !important;
    }

    body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-transaction-section,
    body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section{
        margin:14px 14px 0 !important;
        padding:15px !important;
    }

    body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section{
        margin-bottom:14px !important;
    }

    body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field-grid,
    body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section tbody tr{
        grid-template-columns:1fr !important;
    }

    body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-field--wide,
    body .cpcs-cost-ledger-portrait .cpcs-cost-ledger-history-section tbody td{
        grid-column:auto !important;
    }
}
