@charset "UTF-8";
:root {
    --danger: #d9534f;
    --loader-accent: #ffa516;
    --overlay-bg: rgba(255, 255, 255, 0.75);
}
 
@media (prefers-color-scheme: dark) {
    :root {
        --danger: #ffb3b3;
        --overlay-bg: rgba(0, 0, 0, 0.65);
    }
}
 
.error {
    color: var(--danger);
}
 
#loader_main {
    width: 50px;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(farthest-side, var(--loader-accent) 94%, transparent) top/8px 8px no-repeat,
        conic-gradient(transparent 30%, var(--loader-accent));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 0);
    animation: l13 1s infinite linear;
}
 
@keyframes l13 {
    100% {
        transform: rotate(1turn);
    }
}
 
#overlay {
    background: var(--overlay-bg);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
 
.hide {
    display: none;
}
 /* Mobile Responsive Buttons */
@media (max-width: 767px) {

.responsive-action-buttons {
       display: inline;
        flex-wrap: wrap;
        gap: 5px;
        width: 100%;
    }

    .responsive-action-buttons .btn {
       flex: 1 1 calc(50% - 5px);
        min-width: 0;
        font-size: 12px;
        padding: 8px 5px;
        margin: 0 !important;
        text-align: center;
        white-space: normal;
        line-height: 1.2;
    }

    .responsive-action-buttons .btn i {
         display: block;
        margin: 0 0 4px 0 !important;
    }

   
}

/*Detailed Sales Register remarks icon color change  */

.remark-icon{
    color:#0d6efd !important;
}

.photo-option-menu {
    position: absolute;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 8px;
    width: 200px;
    z-index: 1000;
}
.photo-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
}
.photo-option-item:hover {
    background: #f2f2f2;
}

/* Outstanding Cards CSS */

/* ════════════════════════════════════════════════════
   LAYOUT VISIBILITY
   ════════════════════════════════════════════════════ */
.outstanding-card .layout-single,
.outstanding-card .layout-detail,
.outstanding-card .layout-daily,
.outstanding-total-card .layout-single,
.outstanding-total-card .layout-detail,
.outstanding-total-card .layout-daily {
    display: none;
}

.outstanding-cards[data-layout="single"] .outstanding-card .layout-single,
.outstanding-cards[data-layout="single"]
    .outstanding-total-card
    .layout-single {
    display: block;
}

.outstanding-cards[data-layout="detail"] .outstanding-card .layout-detail,
.outstanding-cards[data-layout="detail"]
    .outstanding-total-card
    .layout-detail {
    display: block;
}

.outstanding-cards[data-layout="daily"] .outstanding-card .layout-daily,
.outstanding-cards[data-layout="daily"] .outstanding-total-card .layout-daily {
    display: block;
}

/* ════════════════════════════════════════════════════
   CARD GRID — responsive columns
   mobile  (<576px) : 1 col
   tablet  (576–991px) : 2 col
   desktop (≥992px) : 3 col
   ════════════════════════════════════════════════════ */
.outstanding-cards {
    display: grid;
    grid-template-columns: 1fr;
    /* mobile default */
    gap: 10px;
    align-items: start;
    /* cards don't stretch to tallest sibling */
}

@media (min-width: 576px) {
    .outstanding-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .outstanding-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Total card spans full width regardless of column count */
.outstanding-total-card {
    grid-column: 1 / -1;
}

/* ════════════════════════════════════════════════════
   DESKTOP TABLE
   Show table on desktop, cards on all screens
   (you can flip this to table-only on desktop if preferred)
   ════════════════════════════════════════════════════ */
.desktop-table-wrap {
    display: none;
}

@media (min-width: 992px) {
    /* Uncomment the two lines below if you want the DataTable
       on desktop and only cards on smaller screens: */
    .desktop-table-wrap {
        display: block;
    }
    .outstanding-cards {
        display: none;
    }
}

/* ════════════════════════════════════════════════════
   SHARED CARD SHELL
   ════════════════════════════════════════════════════ */
.outstanding-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.outstanding-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    padding: 7px 10px;
    border-bottom: 1px solid #e5e5e5;
    background-color: #f9f9f9;
}

.outstanding-card-header .party-name {
    font-weight: 500;
    color: #171717;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.outstanding-card-header .party-city {
    color: #555;
    white-space: nowrap;
}

.outstanding-card-body {
    padding: 6px 10px 8px;
}

/* ════════════════════════════════════════════════════
   SINGLE COLUMN — 3-column grid (label | Dr | Cr)
   ════════════════════════════════════════════════════ */
.outstanding-card-row {
    display: grid;
    grid-template-columns: 1fr 72px 72px;
    align-items: center;
    min-height: 18px;
}

.outstanding-card-row > div:not(:first-child) {
    text-align: right;
}

.outstanding-card-labels {
    margin-bottom: 2px;
    font-weight: 600;
}

.outstanding-card-row .label {
    color: var(--gray);
}

/* ════════════════════════════════════════════════════
   DETAIL DR/CR — 2-column flex (label | net value)
   ════════════════════════════════════════════════════ */
.outstanding-card-body--detail {
    padding: 4px 10px 7px;
}

.outstanding-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 18px;
}

.outstanding-detail-row .label {
    color: var(--gray);
}

/* ════════════════════════════════════════════════════
   DAILY TRANSACTIONS
   ════════════════════════════════════════════════════ */
.outstanding-daily-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 0 10px;
    cursor: pointer;
    user-select: none;
}

.outstanding-daily-header .party-name {
    font-weight: 500;
    color: #171717;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 55%;
}

.daily-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.daily-chevron {
    color: #888;
    transition: transform 0.2s;
}

.outstanding-daily-header.open .daily-chevron {
    transform: rotate(180deg);
}

.outstanding-daily-body {
    border-top: 1px solid #f0f0f0;
    padding: 4px 10px 8px;
}

.outstanding-daily-cols {
    display: grid;
    grid-template-columns: 52px 1fr 1fr 1fr;
    font-weight: 600;
    color: #888;
    padding: 4px 0 2px;
}

.outstanding-daily-cols > div:not(:first-child) {
    text-align: right;
}

.outstanding-daily-row {
    display: grid;
    grid-template-columns: 52px 1fr 1fr 1fr;
    align-items: center;
    min-height: 18px;
}

.outstanding-daily-row > div:not(:first-child) {
    text-align: right;
}

.outstanding-daily-row .label {
    color: var(--gray);
}

.outstanding-daily-row--closing {
    border-top: 1px solid #efefef;
    margin-top: 3px;
    padding-top: 3px;
    font-weight: 500;
}

/* ════════════════════════════════════════════════════
   COLOR HELPERS
   ════════════════════════════════════════════════════ */
.col-dr {
    color: var(--red) !important;
}

.col-cr {
    color: var(--green) !important;
}

.col-muted {
    color: #bbb !important;
}

/* ════════════════════════════════════════════════════
   TOTAL BAR
   ════════════════════════════════════════════════════ */
.outstanding-total-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.outstanding-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 0 12px;
    white-space: nowrap;
    flex-wrap: wrap;
    gap: 4px;
}

.outstanding-total-row strong {
    color: #555;
}

/* ════════════════════════════════════════════════════
   MOBILE — fix total bar to bottom
   ════════════════════════════════════════════════════ */
@media (max-width: 575.98px) {
    .outstanding-cards {
        padding-bottom: 52px;
    }

    .outstanding-total-card {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ════════════════════════════════════════════════════
   DAILY ACCORDION — open by default on tablet/desktop,
   collapsible accordion on mobile only
   ════════════════════════════════════════════════════ */
@media (min-width: 576px) {
    .outstanding-daily-body {
        display: block !important;
    }
    .outstanding-daily-header {
        cursor: default;
    }
    .daily-chevron {
        display: none;
    }
}