﻿body {
    background-color: #F7F9FC;
    font-family: "Roboto", sans-serif;
 background-image:url(../img/header/white-bloom.png1);
}

a{
    text-decoration:none;
}
.bg-primary {
    background: linear-gradient(135deg, #0C528B 0%, #135C95 100%);
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }



   
/*SideBar CSS*/

/* ===== SIDEBAR BASE ===== */
.sidebar {
    width: 270px;
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    z-index: 1000;
    background: #F7F9FC;
    background-image: url('/img/nav-sidebar.jpg');
    background-position: center;
    background-size: cover; /* 🔥 makes it fill full area */
    background-repeat: no-repeat;
    border-right: 1px solid #ccc;
    transition: all 0.35s cubic-bezier(.25,.8,.25,1);
}
    .sidebar .inner-sidebar {
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #aab7cf transparent;
        height: 100%;
        width: 100%;
        display: block;
        background: rgba(245, 247, 250, 0.7);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    /* HIDE */
    .sidebar:not(.open) {
        transform: translateX(-100%);
    }

/* MOBILE */
@media(max-width:1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.open {
            transform: translateX(0);
        }
}

/* ===== MENU ===== */
.sidebar nav.menu {
  
}

/* ===== LABEL ===== */
.menu-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #475569;
    padding: 14px 14px 6px;
    letter-spacing: 1.2px;
    font-weight: 500;
}

/* ===== MENU ITEM ===== */
.sidebar .menu-item {
   
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 6px;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.22s ease;
}

    /* LEFT */
    .sidebar .menu-item .left {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    /* ICON */
    .sidebar .menu-item i {
        font-size: 18px;
        width: 22px;
        transition: 0.25s;
    }

    /* ARROW */
    .sidebar .menu-item .arrow {
        margin-left: auto;
        font-size: 11px;
        opacity: 0.9;
    }

    /* ===== HOVER ===== */
    .sidebar .menu-item:hover {
        background: #EFEFEF;
        color: #000;
    }

.menu-group.open {
    background: rgba(248, 249, 250, 0.7);
    margin: 5px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.09);
}

/* ===== ACTIVE MENU ===== */
.title-active {
    border-radius: 0 !important;
    background-color:#c4c4c4;
    color: #000 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}



/* ===== GROUP ===== */
.menu-group {
}

/* ===== SUBMENU ===== */
.sidebar .submenu {
    margin:5px;
    margin-left: 4px;
 
    display: flex;
    flex-direction: column; /* ✅ FIX: vertical layout */

  

    box-sizing: border-box;
    transition: all 0.3s ease;
}


    /* ===== SUBMENU ITEM ===== */
    .sidebar .submenu .submenu-item {
        display: flex;
        align-items: center;
        padding: 5px 12px ;
        font-size: 14px; /* ✅ FIXED */
        color: #000;  
        text-decoration: none ;
        transition: all 0.22s ease ;
    }

        /* ✅ Override ACTIVE ALSO */
        .sidebar .submenu .submenu-item.active {
            background-color: gainsboro !important;
            color: #000 !important;
            font-weight:500;
        }

        .sidebar .submenu .submenu-item i {
            padding-right: 10px;
        }

        .sidebar .submenu .submenu-item:hover {
            background: #f3f4f6;
            color: #111827;
        }


/* ===== GLOBAL ===== */
.sidebar,
.main,
.topbar {
    transition: all 0.3s ease-in-out;
}


/*End SideBar CSS*/









/* MAIN */
.main {
    margin-left: 270px;
    transition: 0.3s;
}

.sidebar:not(.open) ~ .main {
    margin-left: 0;
}

@media(max-width:1024px) {
    .main {
        margin-left: 5px;
    }
}





/* CONTENT */
.content {
   
    padding: 10px;
}

.page-title h1{
    font-size:1.8rem;
}
.address-block {
    white-space: pre-line;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}



.invoicing-table-responsive {

    background-color: #fff;
    border-radius: 10px;
    margin-bottom: 15px;
}

.invoicing-table {
    width: 100%;
  
    border-collapse: collapse;
    border-spacing: 0 5px; /* 🔥 creates card spacing */
    font-family: Inter, system-ui;
}

    /* HEADER */
    .invoicing-table thead th {
        text-align: center;
        font-weight: 500;
        color: #1b1b1b;
        padding: 8px 10px;
        font-size: 1.0rem;
        background: #f1f3f5;
        border: 1px solid #dee2e6;
        color: #333;
    }
        
/* ROW (card effect) */
    .invoicing-table .modern-row {
        transition: all 0.15s ease;
    }

        .invoicing-table .modern-row:hover {
        }


/* CELL */
    .invoicing-table tr {
        vertical-align: middle;
       
    }
    .invoicing-table td {
        border: 1px solid #dee2e6;
        vertical-align: middle;
    }




/* INPUT */
.invoicing-table input {
    width: 100%;
    border: none;
    outline: none;
    padding: 6px 8px;
    border-radius: 0;
   
    background-color: #fff;
    transition: 0.15s;
}

    .invoicing-table input:focus {
        background: #eef2ff;
        border: solid 1px #ccc;
    }

/* PRODUCT */
    .invoicing-table .product {
        min-width: 260px;
    }
.invoicing-table .product input {
    text-align: left;
    background-color: #fff;
    padding: 8px 10px;
}
    .invoicing-table th.none,
    .invoicing-table td.none {
        background: #fff !important;
        border: none !important;
    }
.invoicing-table input.input-width {
    width: 120px !important;
}
/* READONLY */
    .invoicing-table .readonly {
        text-align: center;
        color: #374151;
        background: #f9f9f9;
    }
    .invoicing-table .tax, .invoicing-table .mrp, .invoicing-table .rate {
        width: 70px;
    }
    .invoicing-table .scheme {
        width: 100px;
    }
/* AMOUNT */
    .invoicing-table .amount {
        text-align: right;
        font-weight: 600;
        color: #111827;
        width: 150px;
    }

/* ACTION */
    .invoicing-table .action button {
        border: none;
        background: transparent;
        color: #ef4444;
        cursor: pointer;
        font-size: 16px;
    }

        .invoicing-table .action button:hover {
            color: #b91c1c;
        }

/* FOOTER */
    .invoicing-table tfoot td {
        padding: 10px;
        font-weight: 600;
        background-color: rgba(234,246,255,0.5);
    }
    .invoicing-table tfoot td:first-child{
        background-color:#fff;
    }

/* ADD */
    .invoicing-table .add {
        color: #2563eb;
        cursor: pointer;
    }

        .invoicing-table .add:hover {
        }

/* TOTAL */
    .invoicing-table .total {
        text-align: right;
        font-size: 15px;
        font-weight: 700;
    }

/* SMALL */
    .invoicing-table .sr {
        width: 40px;
        text-align: center;
    }



.invoicing-summary-card {
    border-radius: 14px;
    padding: 16px;
    transition: all 0.2s ease;
    background: #F9F9F9;
}


.invoicing-summary-card .card-title {
    font-size: 15px;
    font-weight: 700;
    color: #495057;
    margin-bottom: 12px;
}

/* Rows */
    .invoicing-summary-card .summary-row {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        font-size: 14px;
        border-bottom: 1px dashed #dee2e6;
    }

        .invoicing-summary-card .summary-row:last-child {
            border-bottom: none;
        }

    /* Highlight rows */
        .invoicing-summary-card .summary-row.total {
            font-weight: 600;
            color: #0d6efd;
        }

        .invoicing-summary-card .summary-row.grand-total {
            margin-top: 8px;
            padding-top: 10px;
            border-top: 2px solid #dee2e6;
            font-size: 15px;
            font-weight: 700;
            color: #198754;
        }

/* Notes */
    .invoicing-summary-card .note-box {
        min-height: 120px;
        resize: none;
        border-radius: 10px;
        border: 1px solid #dee2e6;
    }


[data-ismctbold="true"] {
    border: solid 1px #FF9898 !important;
    background-color: rgba(255,152,152,0.35) !important;
    font-weight: 500;

}


/* ================================
   FILTER PANEL (MASTER VARIABLES)
================================ */
.filter-pnl {
 
    /* 🎯 PRIMARY */
    --filter-primary: #2147B9;
    --filter-primary-hover: #1d3ea3;
    --filter-primary-light: #dbeafe;
    --filter-primary-border: rgba(33, 71, 185, 0.18);
    /* 🎨 BACKGROUND */
    --filter-bg: #ffffff;
    --filter-bg-soft: #bfdbfe;
    --filter-bg-hover: #e5e7eb;
    --filter-bg-glass: rgba(255,255,255,0.6);
    /* 📝 TEXT */
    --filter-text: #374151;
    --filter-text-dark: #2147B9;
    --filter-text-muted: #6b7280;
    /* 🔴 ACTION */
    --filter-danger: #dc2626;
    /* 🌿 SUCCESS */
    --filter-success-start: #34d399;
    --filter-success-end: #059669;
    /* 🎯 BUTTON */
    --filter-btn-radius: 6px;
    --filter-btn-padding: 5px 10px;
    --filter-btn-shadow: 0 4px 10px rgba(33, 71, 185, 0.15);
    /* 🧱 BORDER / SHADOW */
    --filter-border-soft: rgba(255,255,255,0.5);
    --filter-shadow-soft: 0 10px 30px rgba(0,0,0,0.06);
    --filter-shadow-inner: inset 0 1px 0 rgba(255,255,255,0.7);
    /* 🖱️ SCROLLBAR */
    --filter-scrollbar: rgba(33, 71, 185, 0.25);
    --filter-scrollbar-hover: rgba(33, 71, 185, 0.45);
    /* 🎨 EXTRA UI COLORS (SEMANTIC NAMING) */
    --filter-title-bg: #f1f5f9;
    --filter-summary-value-color: rgba(0,0,0,0.65);
    /* 📝 INPUT */
    --filter-input-border: var(--filter-primary-border);
    --filter-input-focus-border: var(--filter-border-soft);
    /* 📝 INPUT SYSTEM */
    --filter-input-bg: var(--filter-bg);
    --filter-input-text: var(--filter-text);
    --filter-input-placeholder: var(--filter-text-muted);
    --filter-input-border: var(--filter-primary-border);
    --filter-input-border-hover: var(--filter-primary);
    --filter-input-border-focus: var(--filter-primary);
    --filter-input-radius: 8px;
    --filter-input-padding: 6px 12px;
    --filter-input-shadow-focus: 0 0 0 3px rgba(33, 71, 185, 0.15);
    --filter-input-transition: all 0.2s ease;
    padding: 16px;
    border-radius: 16px;
    background: var(--filter-bg);
    box-shadow: var(--filter-shadow-soft), var(--filter-shadow-inner);
    border: 1px solid var(--filter-primary-light);
}

    /* ================================
   INNER PANEL
================================ */
    .filter-pnl .inner-filter-pnl {
        border: 1px solid var(--filter-primary-border);
        border-radius: 14px;
    }

        .filter-pnl .inner-filter-pnl .border-bottom {
            border-color: var(--filter-primary-border) !important;
        }

    /* ================================
   TITLE
================================ */
    .filter-pnl .filter-title {
        padding: 0.6rem 0.75rem;
        width: 160px;
        display: flex;
        align-items: center;
        font-weight: 600;
        font-size: 0.9rem;
        color: var(--filter-text);
        background: var(--filter-title-bg);
        backdrop-filter: blur(10px);
        border-right: 1px solid var(--filter-primary-border);
        border: 1px solid var(--filter-border-soft);
        box-shadow: 0 2px 6px var(--filter-shadow-soft);
    }
        .filter-pnl .filter-title.first-element{
            border-top-left-radius:16px;
        }
        .filter-pnl .filter-title.last-element {
            border-bottom-left-radius: 16px;
        }
        /* ================================
   FILTER TAGS
================================ */
        .filter-pnl .filter-text span {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: var(--filter-bg-soft);
            color: var(--filter-text);
            border: 1px solid var(--filter-bg-hover);
            border-radius: 999px;
            padding: 5px 12px;
            font-size: 0.78rem;
            font-weight: 500;
            margin-left: 6px;
            transition: all 0.2s ease;
        }

        .filter-pnl .filter-text span:hover {
            background: var(--filter-bg-hover);
            color: var(--filter-text-dark);
        }

            .filter-pnl .filter-text span button {
                border: none;
                background-color: transparent;
                color: var(--filter-danger);
                padding: 0px 12px;
                font-weight:500;
            }

            .filter-pnl .filter-text span button:hover {
                background-color: transparent;
            
            }

    /* ================================
   DROPDOWN BUTTON
================================ */
    .filter-pnl .dropdown .btn.dropdown-toggle {
        border-radius: 0 !important;
        padding: 10px 12px;
        font-size: 0.85rem;
        font-weight: 500;
        color: var(--filter-primary);
        background: transparent;
    }

        .filter-pnl .dropdown .btn.dropdown-toggle:hover {
            background: var(--filter-primary);
            color: var(--filter-bg);
        }

        .filter-pnl .dropdown .btn.dropdown-toggle:focus {
            background: var(--filter-primary-hover);
            color: var(--filter-bg);
        }

    /* ================================
   LIST ITEMS
================================ */
    .filter-pnl .list-container {
        max-height: 250px;
        overflow-y: auto;
       
       min-width:150px!important;
    }

    .filter-pnl .form-check-container {
        
        padding: 6px 14px;
    }

        .filter-pnl .form-check-container:hover {
            background: var(--filter-primary-light);
        }
    .filter-pnl .w-max {
        width: 200px !important;
    }
    /* ================================
   BUTTONS
================================ */
    .filter-pnl button {
        background: var(--filter-primary);
        color: var(--filter-bg);
        border: none;
      
        padding: var(--filter-btn-padding);
        transition: all 0.2s ease;
    }

        .filter-pnl button:hover {
            background: var(--filter-primary-hover);
            box-shadow: var(--filter-btn-shadow);
            transform: translateY(-1px);
        }

        /* RESET BUTTON */
        .filter-pnl button.reset {
            background: transparent !important;
            border: 1px solid var(--filter-primary-border);
            color: var(--filter-text);
        }

            .filter-pnl button.reset:hover {
                background: var(--filter-primary-light) !important;
                color: var(--filter-primary);
            }

    /* ================================
   SUMMARY
================================ */
    .filter-pnl .summary-value {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--filter-summary-value-color);
    }

    .filter-pnl .summary-title {
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--filter-text-muted);
    }

    .filter-pnl input[type="text"] {
        width: 100%;
        padding: var(--filter-input-padding);
        border-radius: var(--filter-input-radius);
        border: 1px solid var(--filter-input-border);
        background: var(--filter-input-bg);
        color: var(--filter-input-text);
        outline: none;
        transition: var(--filter-input-transition);
    }

        /* Placeholder */
        .filter-pnl input[type="text"]::placeholder {
            color: var(--filter-input-placeholder);
            font-size: 0.8rem;
        }

        /* Hover */
        .filter-pnl input[type="text"]:hover {
            border-color: var(--filter-input-border-hover);
        }

        /* Focus (🔥 premium effect) */
        .filter-pnl input[type="text"]:focus {
            border-color: var(--filter-input-border-focus);
            box-shadow: var(--filter-input-shadow-focus);
        }

        /* Optional: subtle active press */
        .filter-pnl input[type="text"]:active {
            transform: scale(0.995);
        }
    /* ================================
   SCROLLBAR
================================ */
    .filter-pnl .list-container::-webkit-scrollbar {
        width: 6px;
    }

    .filter-pnl .list-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .filter-pnl .list-container::-webkit-scrollbar-thumb {
        background: var(--filter-scrollbar);
        border-radius: 10px;
    }

        .filter-pnl .list-container::-webkit-scrollbar-thumb:hover {
            background: var(--filter-scrollbar-hover);
        }
@media (max-width: 768px) {
    .filter-pnl {
        padding: 0px !important;
    }
        .filter-pnl .filter-title {
            width: 100%;
            display: block; /* important */
            border-right: none;
            border-bottom: 1px solid var(--filter-primary-border);
        }
            .filter-pnl .filter-title.first-element {
                border-top-left-radius: 16px;
                border-top-right-radius: 16px;
                
            }
            .filter-pnl .filter-title.last-element {
                border-bottom-left-radius: 0px;
            }
}



/* =========================
   GLOBAL CONTAINER
========================= */
.invoice-container {
    /* 🎯 PRIMARY BLUE */
    --invoice-primary: #2147B9;
    --invoice-primary-hover: #1d3ea3;
    --invoice-primary-light: #dbeafe;
    --invoice-primary-soft: #bfdbfe;
    --invoice-primary-deep: #1e3a8a;
    /* BASE */
    --invoice-bg: #ffffff;
    --invoice-border: #e5e7eb;
    /* TEXT */
    --invoice-text-primary: #111827;
    --invoice-text-secondary: #6b7280;
    --invoice-text-tertiary: #475569;
    /* SHADOW */
    --invoice-shadow-light: rgba(0,0,0,0.04);
    --invoice-shadow-medium: rgba(0,0,0,0.06);
    --invoice-shadow-strong: rgba(0,0,0,0.08);
    --invoice-shadow-hover: rgba(0,0,0,0.12);
    /* STATUS COLORS (keep semantic) */
    --invoice-success-bg: #dcfce7;
    --invoice-success-text: #166534;
    --invoice-red-light: #fee2e2;
    --invoice-red-dark: #991b1b;
    --invoice-orange-light: #fff7ed;
    --invoice-orange-soft: #ffedd5;
    --invoice-orange-main: #ea580c;
    --invoice-orange-dark: #9a3412;
    /* GRAY */
    --invoice-gray-soft: #f3f4f6;
    --invoice-gray-light: #f1f5f9;
    --invoice-gray-table: #f5f6f9;
    --invoice-gray-muted: #9ca3af;
    /* SPECIAL */
    --invoice-pink-soft: #fff1f2;
    /* INPUT */
    --invoice-input-focus: var(--invoice-primary);
    --invoice-input-shadow: rgba(33,71,185,0.2);
    /* SCROLL */
    --invoice-scrollbar: var(--invoice-primary-soft);
    /* GLASS */
    --invoice-glass-bg: rgba(255,255,255,0.85);
    /* ACCENT */
    --invoice-accent: var(--invoice-primary);
    background: var(--invoice-bg);
    border: 1px solid var(--invoice-border);
    box-shadow: 0 1px 2px var(--invoice-shadow-light), 0 8px 24px var(--invoice-shadow-medium);
    border-radius: 14px;
}
/* =========================
   HEADER MODERN
========================= */
.invoice-header {
    position: sticky;
    top: 60px;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--invoice-glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--invoice-border);
}

/* LEFT */
.invoice-header-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.invoice-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--invoice-text-primary);
    margin: 0;
}

.invoice-sub {
    font-size: 12px;
    color: var(--invoice-text-secondary);
}
/* header text */
.invoice-header-left h4,
.invoice-header-left .invoice-sub {
    margin: 0;
}

/* small screens */
@media (max-width: 768px) {
    .invoice-header-left {
        flex-direction: row; /* change layout to row */
        justify-content: space-between; /* buttons left, title right */
        align-items: center;
        width: 100%;
    }

    .title-row {
        flex: 1; /* buttons take left side */
    }

    .invoice-header-left h4,
    .invoice-header-left .invoice-sub {
        text-align: right;
    }
}
/* =========================
   MINI BUTTON GROUP
========================= */
.mini-btn-group {
    display: flex;
    background: var(--invoice-gray-soft);
    border-radius: 10px;
    padding: 3px;
}

.mini-btn {
    padding: 5px 12px;
    font-size: 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--invoice-text-secondary);
}

    .mini-btn.active {
        background: var(--invoice-bg);
        color: var(--invoice-primary-deep);
        box-shadow: 0 2px 6px var(--invoice-shadow-strong);
    }

/* =========================
   ACTIONS LAYOUT
========================= */
.invoice-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    width: 65%;
}

/* LEFT GROUP */
.action-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* RIGHT GROUP */
.action-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================
   SEGMENT BUTTONS
========================= */
.btn-segment.soft {
    background: var(--invoice-gray-light);
    border-radius: 999px;
    padding: 4px;
}

.seg-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 999px;
    background: transparent;
    font-size: 12px;
    cursor: pointer;
    color: #475569;
}

    .seg-btn.active {
        background: var(--invoice-primary-hover);
        color: var(--invoice-bg);
    }
.stat-btn:disabled {
    background: var(--invoice-gray-light);
    color: var(--invoice-gray-muted);
    border: 1px dashed var(--invoice-border);
}

    /* badge also muted */
    .stat-btn:disabled .stat-badge {
        background: var(--invoice-gray-muted);
        color: #fff;
    }
/* =========================
   STAT CHIPS (NEW MODERN)
========================= */
/* STAT BUTTONS */
.stat-btn {
    display: flex;
    align-items: center;
    gap: 6px;
   
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
   
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px var(--invoice-shadow-strong);
    background: var(--invoice-primary-light);
    color: var(--invoice-primary-deep);
    border: 1px solid var(--invoice-primary);
}

    .stat-btn:hover {
        background: var(--invoice-primary-soft);
        box-shadow: 0 2px 6px var(--invoice-shadow-hover);
    }

    .stat-btn .stat-badge {
        background: var(--invoice-primary-deep);
        color: var(--invoice-bg);
        padding: 2px 6px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 600;
    }

    /* WARNING BUTTON (EWB) */
    .stat-btn.warning {
        background: var(--invoice-orange-light);
        color: var(--invoice-orange-dark);
        border-color: var(--invoice-orange-border);
    }

        .stat-btn.warning:hover {
            background: var(--invoice-orange-soft);
        }

        .stat-btn.warning .stat-badge {
           
            background: var(--invoice-orange-main);
        }
/* =========================
   SEARCH BOX
========================= */
.search-box input {
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--invoice-border);
    font-size: 13px;
    width: 200px;
    transition: 0.2s;
}

    .search-box input:focus {
        border-color: var(--invoice-input-focus);
        box-shadow: 0 0 0 3px var(--invoice-input-shadow);
        outline: none;
    }

/* =========================
   BUTTONS
========================= */
.btn-soft {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid var(--invoice-border);
    background: var(--invoice-bg);
    cursor: pointer;
}

    .btn-soft:hover {
        background: #f9fafb;
    }

.invoice-btn.primary {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--invoice-primary), var(--invoice-primary-hover));
    color: #fff;
    cursor: pointer;
}

    .invoice-btn.primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(5,150,105,0.3);
    }

/* =========================
   MOBILE RESPONSIVE
========================= */
@media (max-width: 768px) {

    .invoice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .invoice-actions {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .action-right {
        width: 100%;
        justify-content: space-between;
    }

    .search-box input {
        width: 100%;
    }
}

/* =========================
   STATS
========================= */
.invoice-stats {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
}
.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* each block */
.stats-item {
    display: flex;
    flex-direction: column; /* 🔥 label ऊपर, value नीचे */
    flex: 1; /* 🔥 equal width */
}

    /* left align */
    .stats-item.left {
        align-items: flex-start;
    }

    /* right align */
    .stats-item.right {
        align-items: flex-end;
    }

    /* label */
    .stats-item span {
        font-size: 14px;
        color: #6b7280;
        font-weight:500;
    }

    /* value */
    .stats-item strong {
        font-size: 18px;
        font-weight: 700;
        color: #065f46;
    }

/* =========================
   PROGRESS
========================= */
.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 5px;
}
    .progress-header span:last-child {
        color: #059669;
        font-weight: 600;
        font-size:14px;
    }

.progress-bar {
    height: 8px;
    background: var(--invoice-border);

    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--invoice-primary), var(--invoice-primary-hover));
    box-shadow: 0 0 10px rgba(33,71,185,0.4);
    border-radius: 20px;
    transition: width 0.5s ease;
   
}

/* =========================
   TABLE WRAPPER (SCROLL)
========================= */
.invoice-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    min-height: 320px !important
}

    /* scrollbar */
    .invoice-table-wrapper::-webkit-scrollbar {
        height: 6px;
    }

    .invoice-table-wrapper::-webkit-scrollbar-thumb {
        background: var(--invoice-scrollbar);
        border-radius: 10px;
    }

/* =========================
   TABLE
========================= */
.invoice-list-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
  
}

    .invoice-list-table thead th {
        text-align: left;
        font-weight: 600;
        color: var(--invoice-text-secondary);
        border-bottom: 1px solid var(--invoice-border);
        background: var(--invoice-gray-table);
        padding: 10px 8px;
        position: sticky;
        top: 0;
        z-index: 3;
    }

    .invoice-list-table tbody tr {
        border-bottom: 1px solid var(--invoice-gray-light);
        transition: all 0.2s ease;
    }

        .invoice-list-table tbody tr:hover {
            background: var(--invoice-primary-light);
        }

    .invoice-list-table td {
        padding: 10px 8px;
        color: var(--invoice-text-primary);
        white-space: nowrap;
    }

        /* sticky first column */
        .invoice-list-table td:first-child,
        .invoice-list-table th:first-child {
            position: sticky;
            left: 0;
        
            z-index: 2;
        }

    .invoice-list-table tbody tr:hover {
        background: #f9fafb;
        cursor: pointer;
    }

    .invoice-list-table tbody tr[data-isSOG="false"] {
        background: var(--invoice-pink-soft);
        border-color: rgba(255,83,71,.25);
    }
/* container */
.custom-date-dropdown {
    position: relative;
}

/* popup */
.date-popup {
    position: absolute !important;
    top: 15px !important;
    left: 0;
    min-width: 200px;
    border-radius: 10px;
    z-index: 10 !important;
    /* ✅ use theme shadow */
    /* ✅ optional glass effect */
    background: var(--invoice-bg);
    border: 1px solid var(--invoice-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 12px 30px rgba(33, 71, 185, 0.12);
}

/* dropdown body */
.date-dropdown {
    min-width: 200px;
    padding: 12px;
    border-radius: 10px;
}

    /* label */
    .date-dropdown .form-label {
        font-size: 12px;
        font-weight: 600;
        /* ❌ was #374151 */
        color: var(--invoice-text-tertiary);
    }

    /* input */
    .date-dropdown .form-control {
        font-size: 13px;
        border-radius: 6px;
        /* ✅ add proper theming */
        border: 1px solid var(--invoice-border) !important;
        background: var(--invoice-bg);
        color: var(--invoice-text-primary);
    }

        /* focus effect (important for UI quality) */
        .date-dropdown .form-control:focus {
            border-color: var(--invoice-primary);
            box-shadow: 0 0 0 3px var(--invoice-input-shadow);
            outline: none;
        }

    /* button */
    .date-dropdown button {
        font-size: 13px;
        /* ✅ themed button */
        background: var(--invoice-primary);
        color: var(--invoice-bg);
        border: none;
        border-radius: 6px;
        padding: 6px 10px;
        transition: 0.2s ease;
    }

        .date-dropdown button:hover {
            background: var(--invoice-primary-hover);
        }
    /* RESET BUTTON (light style) */
    .date-dropdown .btn-reset {
        background: transparent;
        border: 1px solid var(--invoice-border);
        color: var(--invoice-text-secondary);
    }

        /* hover */
        .date-dropdown .btn-reset:hover {
            background: var(--invoice-primary-light);
            color: var(--invoice-primary);
            border-color: var(--invoice-primary);
        }

/* =========================
   TABLE SKELETON
========================= */

/* row subtle fade */
.sk-row td {
    padding: 10px 8px;
}

/* shimmer base (already exists but improved) */
.sk-line,
.sk-box,
.sk-badge {
    display: inline-block;
    border-radius: 6px;
    background: linear-gradient( 90deg, var(--invoice-gray-light) 25%, var(--invoice-border) 37%, var(--invoice-gray-light) 63% );
    background-size: 1000px 100%;
    animation: shimmer 1.2s infinite linear;
}

/* line */
.sk-line {
    height: 12px;
}

/* checkbox skeleton */
.sk-box.sm {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* badge (EWB) */
.sk-badge {
    width: 40px;
    height: 16px;
    border-radius: 999px;
}

/* widths (extra) */
.w-80 {
    width: 80px;
}

.w-100 {
    width: 100px;
}

.w-120 {
    width: 120px;
}
/* =========================
   STATUS
========================= */
.status {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
}

    .status.ok {
        background: var(--invoice-success-bg);
        color: var(--invoice-success-text);
    }

    .status.bad {
        background: var(--invoice-red-light);
        color: var(--invoice-red-dark);
    }

/* =========================
   CHECKBOX
========================= */
.invoice-list-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--invoice-primary-hover);
}

/* =========================
   SKELETON
========================= */
@keyframes shimmer {
    0% {
        background-position: -500px 0;
    }

    100% {
        background-position: 500px 0;
    }
}

.sk-line,
.sk-progress {
    display: inline-block;
    border-radius: 6px;
    background: linear-gradient( 90deg, var(--invoice-gray-light) 25%, var(--invoice-border) 37%, var(--invoice-gray-light) 63% );
    background-size: 1000px 100%;
    animation: shimmer 1.2s infinite linear;
}

.sk-line {
    height: 12px;
}

.sk-progress {
    height: 8px;
    width: 100%;
}

.w-40 {
    width: 40px;
}

.w-70 {
    width: 70px;
}

.w-90 {
    width: 90px;
}

.w-120 {
    width: 120px;
}

.w-140 {
    width: 140px;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {

    .invoice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .invoice-actions {
        width: 100%;
        flex-direction: column;
    }

    .invoice-btn.primary {
        width: 100%;
    }

   /* .stats-row {
        flex-direction: column;
        gap: 10px;
    }*/
     .stats-item strong {
            font-size: 16px;
        }
    
    .invoice-list-table th,
    .invoice-list-table td {
        font-size: 13px;
    }
        /* sticky first column */
        .invoice-list-table td:first-child,
        .invoice-list-table th:first-child {
            background: var(--invoice-bg);
        }

    .invoice-list-table thead th:first-child {
        background: var(--invoice-gray-table);
    }
}

/* =========================
   PAGINATION
========================= */
.invoice-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--invoice-border);
    background: var(--invoice-gray-50);
    flex-wrap: wrap;
    gap: 10px;
}

.page-info {
    font-size: 13px;
    color: var(--invoice-text-secondary);
    font-weight: 500;
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pg-btn {
    border: 1px solid var(--invoice-border);
    background: var(--invoice-bg);

    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 32px;
}

    .pg-btn:hover {
        background: var(--invoice-primary-light);
        border-color: var(--invoice-primary);
        color: var(--invoice-primary-deep);
    }

    .pg-btn.active {
        background: linear-gradient(135deg, var(--invoice-primary), var(--invoice-primary-hover));
        color: var(--invoice-bg);
    
        border: none;
        font-weight: 600;
    }

    .pg-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.dots {
    padding: 0 6px;
    color: var(--invoice-gray-muted);
    font-weight: bold;
}

/* MOBILE */
@media (max-width: 768px) {
    .invoice-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-controls {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }
}





/* ========================= */
/* CONTAINER (MASTER ROOT) */
/* ========================= */
.dst-table-container {
    width: 100%;
    overflow: auto;
    min-height: 420px;
    border-radius: 8px;
  
    background: #ffffff;
    margin: 10px 0;
}

    /* SCROLLBAR (SOFT) */
    .dst-table-container::-webkit-scrollbar {
        height: 6px;
        width: 6px;
    }

    .dst-table-container::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 10px;
    }

/* ========================= */
/* TABLE BASE */
/* ========================= */
.dst-table {
    width: 100%;
    border-collapse: separate; /* 🔥 important for spacing */
    border-spacing: 0;
    min-width: 650px;
    margin: 10px 0;
}

    /* ========================= */
    /* HEADER */
    /* ========================= */
    .dst-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #f9fafb;
        color: #1b1b1b;
        font-weight: 600;
        padding: 12px 14px; /* 🔥 better spacing */
        border-bottom: 1px solid #e5e7eb;
        text-align: left;
    }
    .dst-table tbody tr {
        background: #ffffff;
    }

        .dst-table tbody tr + tr td {
            border-top: 1px solid #f3f4f6;
        }
    /* ========================= */
    /* BODY */
    /* ========================= */
    .dst-table tbody td {
        padding: 12px 14px; /* 🔥 increased spacing */
        color: #1C210C;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    /* ROW STYLE */
    .dst-table tbody tr {
        transition: all 0.15s ease;
    }

/* HOVER */
    .dst-table .dst-table-hover tbody tr:hover td {
        background: #f8fafc;
    }

    /* ========================= */
    /* COLUMN SPACING IMPROVE */
    /* ========================= */
    .dst-table td:first-child,
    .dst-table th:first-child {
        padding-left: 16px;
    }

    .dst-table td:last-child,
    .dst-table th:last-child {
        padding-right: 16px;
    }

/* ========================= */
/* HELPERS */
/* ========================= */
table.dst-table tbody .amount {
    color: darkgreen !important;
    font-weight:600!important;
}



.dst-table-container .section-header {
    padding: 14px 25px !important;
    font-size:1.2rem;
    font-weight:500;
}
/* ========================= */
/* RESPONSIVE TYPOGRAPHY */
/* ========================= */
/* Desktop → compact */
@media (min-width: 1200px) {
    .dst-table th, .dst-table td {
        font-size: 13.8px;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .dst-table th,
    .dst-table td {
        font-size: 13.5px;
    }
}

/* Mobile → bigger readable */
@media (max-width: 768px) {
    .dst-table th,
    .dst-table td {
        font-size: 15px;
        padding: 14px 12px; /* 🔥 more tap-friendly */
    }

    .dst-table-container {
        min-height: 300px;
    }
}





/* ========================= */
/* ROOT */
/* ========================= */
.dst-sog {
    width: 100%;
    max-width: 100%;
    font-family: monospace;
    color: #111;
}

/* ========================= */
/* HEADER */
/* ========================= */
.dst-sog-header {
    text-align: center;
    margin-bottom: 6px;
}

    .dst-sog-header h4 {
        margin: 2px 0;
        font-size: 14px;
        font-weight: 600;
    }

    .dst-sog-header h5 {
        margin: 2px 0;
        font-size: 12px;
        font-weight: 500;
    }

    .dst-sog-header h6 {
        margin: 2px 0;
        font-size: 11px;
        color: #555;
    }

/* ========================= */
/* TABLE BASE */
/* ========================= */
.dst-sog-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
}

/* REMOVE RED BACKGROUND ❌ */
.dst-sog-table {
    background: transparent !important;
}

    /* ========================= */
    /* TABLE HEAD */
    /* ========================= */
    .dst-sog-table thead th {
        font-size: 11px;
        font-weight: 600;
        text-align: left;
        padding: 4px 2px;
        border-bottom: 1px dashed #000;
    }

    /* ========================= */
    /* TABLE BODY */
    /* ========================= */
    .dst-sog-table tbody td {
        font-size: 11px;
        padding: 3px 2px;
        border-bottom: 1px dotted #ddd;
    }

    /* LAST ROW CLEAN */
    .dst-sog-table tbody tr:last-child td {
        border-bottom: none;
    }



/* ========================= */
/* INFO TABLE (TOP) */
/* ========================= */
.dst-sog-table tr td {
    font-size: 11px;
    padding: 2px 2px;
}

/* ========================= */
/* SPACING */
/* ========================= */
.dst-sog hr {
    border: none;
    border-top: 1px dashed #000;
    margin: 6px 0;
}

/* ========================= */
/* PRINT SETTINGS */
/* ========================= */
@media print {

    @page {
        size: auto;
        margin: 3mm;
    }

    html, body {
        margin: 0;
        padding: 0;
        height: auto !important;
        overflow: hidden !important;
    }

    .no-print {
        display: none !important;
    }

    .pos-print {
        display: block !important;
        width: 100%;
        font-size: 11px;
        padding: 4px;
        background: #fff;
    }

        .pos-print * {
            page-break-inside: avoid !important;
        }

    .pos-print {
        page-break-after: avoid !important;
    }
}