/* =========================================
   LEDGER FILTER — COMPACT HEIGHT FIX
========================================= */

.snc-section.snc-ledger-filter {
    padding: 0 !important;
    margin-bottom: 16px !important;
}

.snc-section.snc-ledger-filter .snc-section-header {
    padding: 10px 20px !important;
}

.snc-section.snc-ledger-filter .snc-section-body {
    padding: 12px 20px !important;
}

.snc-section.snc-ledger-filter .snc-row {
    margin-bottom: 0 !important;
    row-gap: 10px !important;
}

.snc-section.snc-ledger-filter input,
.snc-section.snc-ledger-filter button {
    height: 44px !important;
    margin: 0 !important;
}

.snc-section.snc-ledger-filter form {
    margin: 0 !important;
}


/* =========================================
   LEDGER CARDS — DASHBOARD STYLE
========================================= */

.snc-ledger-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 24px 0 10px;
}

.snc-ledger-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 26px 26px 26px 80px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    transition: all 0.25s ease;
}

.snc-ledger-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(0,0,0,0.08);
}

.snc-ledger-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 6px;
    border-radius: 6px;
    background: #2563eb;
}

.snc-ledger-card::after {
    content: "";
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2563eb;
    opacity: 0.15;
}

.snc-ledger-card div {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    margin-bottom: 6px !important;
    letter-spacing: 0.2px;
    text-align: left;
}

.snc-ledger-card strong {
    font-size: 30px !important;
    font-weight: 700 !important;
    color: #4b5563 !important;
    line-height: 1.1;
    text-align: left;
}

/* Colors */
.snc-ledger-card:nth-child(1)::before,
.snc-ledger-card:nth-child(1)::after { background: #2563eb; }

.snc-ledger-card:nth-child(2)::before,
.snc-ledger-card:nth-child(2)::after { background: #16a34a; }

.snc-ledger-card:nth-child(3)::before,
.snc-ledger-card:nth-child(3)::after { background: #f97316; }

.snc-ledger-card:nth-child(4)::before,
.snc-ledger-card:nth-child(4)::after { background: #7c3aed; }

/* Icons */
.snc-ledger-card::after {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    opacity: 1 !important;
    filter: none !important;
    transform: translateY(-50%) scale(1.15) !important;
}

.snc-ledger-card:nth-child(1)::after { content: "📦"; color: #1d4ed8 !important; }
.snc-ledger-card:nth-child(2)::after { content: "💰"; color: #15803d !important; }
.snc-ledger-card:nth-child(3)::after { content: "⏳"; color: #ea580c !important; }
.snc-ledger-card:nth-child(4)::after { content: "💳"; color: #6d28d9 !important; }

@media (max-width: 768px) {
    .snc-ledger-card {
        padding: 22px 22px 22px 72px;
    }
    .snc-ledger-card strong {
        font-size: 28px !important;
    }
}


/* ===========================
   LEDGER TABLE - FINAL FIX
   (NO SCROLL + CHARGES FULL VISIBLE)
=========================== */

.snc-ledger-table-wrap{
    width: 100% !important;
    overflow-x: hidden !important;   /* no scroll */
}

.snc-ledger-table{
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
}

.snc-ledger-table th,
.snc-ledger-table td{
    padding: 10px 8px !important;
    vertical-align: middle !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: break-word !important;
}

.snc-ledger-table th{
    color: #000 !important;
    font-weight: 600 !important;
}

/* Charges column fixed width so input + save never cut */
.snc-ledger-table th:last-child,
.snc-ledger-table td:last-child{
    width: 230px !important;
    white-space: nowrap !important;
}

/* Charges form inline */
.snc-ledger-charges-form{
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 0 !important;
}

.snc-ledger-charge-input{
    width: 95px !important;
    height: 36px !important;
    padding: 6px 8px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    text-align: center !important;
}

.snc-ledger-save-btn{
    height: 36px !important;
    line-height: 36px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
}
/* ===========================
   LEDGER TABLE - HEIGHT + ALIGN FIX
   (PASTE AT END OF FILE)
=========================== */

/* Row height kam */
.snc-ledger-table th,
.snc-ledger-table td{
    padding: 10px 12px !important;   /* pehle 10px tha */
    line-height: 22px !important;
}

/* Consignee column thori wide */
.snc-ledger-table th:nth-child(6),
.snc-ledger-table td:nth-child(6){
    width: 210px !important;
}

/* Charges column fixed width */
.snc-ledger-table th:last-child,
.snc-ledger-table td:last-child{
    width: 210px !important;
}

/* Shipper column width thori zyada */
.snc-ledger-table th:nth-child(5),
.snc-ledger-table td:nth-child(5){
    width: 160px !important;
}

/* Charges form perfectly center + same line */
.snc-ledger-charges-form{
    display: flex !important;
    align-items: center !important;      /* 🔥 same level */
    justify-content: center !important;
    gap: 10px !important;
}

/* Date column width increase */
.snc-ledger-table th:nth-child(2),
.snc-ledger-table td:nth-child(2){
    width: 110px !important;
}


/* Input height same */
.snc-ledger-charge-input{
    height: 36px !important;
}

/* Save button input ke bilkul same level pe */
.snc-ledger-save-btn{
    height: 36px !important;
    line-height: 36px !important;
    padding: 0 16px !important;
    margin: 0 !important;               /* 🔥 neeche wali spacing remove */
    position: relative !important;
    top: 0 !important;                  /* 🔥 ensure no down shift */
}


/* FIX: Ledger cards amount left align */
.snc-ledger-card,
.snc-ledger-card div,
.snc-ledger-card strong{
    text-align: left !important;
}

/* ===============================
PAGINATION
=============================== */
.snc-pagination {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.snc-pagination .snc-save-btn {
    padding: 6px 12px;
    font-size: 14px;
}

.snc-pagination .snc-save-btn.active {
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
}

/* ===========================
   FINAL LEDGER CHARGES FIX
=========================== */

/* Charges column content inline */
.snc-ledger-table td:last-child {
    white-space: nowrap !important;
}

/* Charges form inline */
.snc-ledger-charges-form {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 0 !important;
}

/* Amount input size fix */
.snc-ledger-charge-input {
    width: 95px !important;
    height: 36px !important;
    padding: 6px 8px !important;
    text-align: center !important;
}

/* Save button size fix */
.snc-ledger-table .snc-save-btn,
.snc-ledger-save-btn {
    width: auto !important;
    min-width: 90px !important;
    height: 36px !important;
    line-height: 36px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    display: inline-block !important;
}

.snc-ledger-table td {
    padding: 6px;
}

.snc-ledger-table input.snc-inline-pkgs,
.snc-ledger-table input.snc-inline-weight {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 6px;
    font-size: 14px;
}
/* === Ledger inline edit inputs fix === */

.snc-ledger-table {
    table-layout: fixed;
}

.snc-ledger-table th:nth-child(7),
.snc-ledger-table td:nth-child(7),
.snc-ledger-table th:nth-child(8),
.snc-ledger-table td:nth-child(8) {
    width: 90px;
    text-align: center;
}

.snc-ledger-table td {
    vertical-align: middle;
}

.snc-ledger-table input.snc-inline-pkgs,
.snc-ledger-table input.snc-inline-weight {
    width: 70px;
    height: 36px;
    padding: 4px 6px;
    font-size: 14px;
    line-height: 1;
    text-align: center;
    box-sizing: border-box;
}

