﻿@font-face {
    font-family: 'Inter var';
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    src: url('/admin/assets/fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
}

:root {
    --tblr-font-sans-serif: 'Inter var', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--tblr-font-sans-serif);
}


.nav-link{
    font-size: 0.87rem;
}

/* Skelton Loader*/
/* ===== Skeleton Loader ===== */

.skeleton-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-row {
    display: flex;
    gap: 12px;
}

.skeleton-box {
    position: relative;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

/* Shimmer animation */
.skeleton-box::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient( 90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100% );
    animation: skeleton-wave 1.4s infinite;
}

@keyframes skeleton-wave {
    100% {
        transform: translateX(100%);
    }
}



/* Toast animations*/
.custom-toast {
    animation: toast-in 300ms ease forwards;
}

.custom-toast.hide {
    animation: toast-out 300ms ease forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}




/* ===============================
   INVOICE CSS: OUTER WRAPPER (SCREEN ONLY)
================================ */

.invoice-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

/* ===============================
   INVOICE PAGE (SOURCE OF TRUTH)
================================ */

.invoice-page {
    background: #fff;
    border: 1px solid #000;
    padding: 24px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ===============================
   HEADER
================================ */

.invoice-company-name {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.invoice-header-top {
    padding: 16px 0;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.invoice-header {
    padding: 0 10px;
}

/* ===============================
   CONTENT
================================ */

.invoice-content {
    flex: 1 1 auto;
}

/* ===============================
   TABLE
================================ */

.invoice-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
}

    .invoice-table th,
    .invoice-table td {
        font-size: 13px;
        vertical-align: middle;
    }


/* ===============================
   FOOTER (INSIDE BORDER)
================================ */

.invoice-footer {
    border-top: 1px solid #dee2e6;
    padding-top: 12px;
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
}


.invoice-summary-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 32px;
}

.invoice-terms {
    flex: 1;
    font-size: 0.85rem;
}

.invoice-total {
    min-width: 200px;
    max-width:300px;
    align-self: flex-start;
}

/* MOBILE FIX */
@media (max-width: 768px) {
    .invoice-summary-wrapper {
        flex-direction: column;
    }

    .invoice-total {
        order: -1; /* TOTAL ALWAYS FIRST */
        width: 100%;
    }
}


/* ===============================
   MOBILE RESPONSIVE
================================ */

@media (max-width: 768px) {

    .invoice-table thead {
        display: none;
    }

    .invoice-table,
    .invoice-table tbody,
    .invoice-table tr,
    .invoice-table td {
        display: block;
        width: 100%;
    }

        .invoice-table tr {
            border: 1px solid #dee2e6;
            margin-bottom: 12px;
            padding: 8px;
            border-radius: 4px;
        }

        .invoice-table td {
            display: flex;
            justify-content: space-between;
            padding: 6px 8px;
            border-bottom: 1px dashed #e9ecef;
        }

            .invoice-table td:last-child {
                border-bottom: none;
                font-weight: 600;
            }

            .invoice-table td::before {
                content: attr(data-label);
                font-weight: 600;
                color: #495057;
            }
}

/* ===============================
   PRINT
================================ */


@media print {

    .no-print {
        display: none !important;
    }

    body {
        background: #fff;
    }

    html, body {
        height: 100%;
    }

    .invoice-table th,
    .invoice-table td {
        padding: 8px 3px;
        font-size: 10px;
    }

    .invoice-page {
        padding-bottom: 55px;
    }

    .invoice-footer {
        position: absolute;
        bottom: 20px;
        left: 24px;
        right: 24px;
        background: #fff;
    }

    .invoice-content {
        margin-bottom: 20px;
    }

    .invoice-table tr {
        page-break-inside: avoid;
    }

}

/* ***************************/
/* Payment Receipt CSS*/
/* ***************************/

.receipt-card {
    background: #fff;
/*    border: 1px solid #dee2e6;*/
    border: 1px solid #000;
/*    padding: 24px;*/
    min-height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 0px;
}


.invoice-table th,
.invoice-table td {
    vertical-align: middle;
}

.invoice-table thead th {
    text-align: center;
}

@media print {

    body {
        background: #fff !important;
    }

    .no-print,
    .navbar,
    .sidebar,
    .topbar,
    .page-header,
    footer {
        display: none !important;
    }

    .container,
    .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .card,
    .receipt-card {
/*        border: none !important;*/
        box-shadow: none !important;
        border: 1px solid #000;
    }

    table {
        page-break-inside: avoid;
    }

    tr {
        page-break-inside: avoid;
    }

    h1, h2, h3, h4, h5 {
        page-break-after: avoid;
    }

    .receipt-card {
        margin: 0;
        padding: 0;
    }

    @page {
        size: A4;
        margin: 12mm;
    }
}