html {
  font-size: 14px;
}

td{
    font-size:12px;
}



/* Force break before certain elements if needed */
.page-break {
    page-break-before: always;
}

/* Make sure table fits A4 nicely */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 6px;
    border: 1px solid #000;
    font-size: 12px;
}

@media print {
    .no-print {
        display: none !important;
    }
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

input.serial {
    border: none;
    outline: none;
    background-color: transparent; /* optional: to make it look like plain text */
    pointer-events: none; /* optional: disables click/focus if needed */
}


.fade-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.5s ease;
}

.fade-scale.show {
    opacity: 1;
    transform: scale(1);
    color: #007bff; /* Blue tone */
}

.totalBalance strong {
    background: linear-gradient(90deg, #007bff, #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 198, 255, 0.6);
}

body {
    font-family: Arial, sans-serif;
    color: #333;
}

.invoice-header {
    background-color: #f2f2f2;
    padding: 10px;
    text-align: start;
}

    .invoice-header h1 {
        margin: 0;
    }

.invoice-details {
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

    .table th, .table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }


.total {
    float: right;
    font-weight: bold;
}

@media print {
    @page {
        size: A4;
        margin: 10mm 10mm 10mm 10mm;

        @bottom-center {
            content: "Page " counter(page) " of " counter(pages);
            font-size: 12px;
            font-family: Arial, sans-serif;
        }
    }

    body {
        margin: 0;
        padding: 0;
    }

    .no-print {
        display: none !important;
    }

    table {
        width: 100%;
        page-break-inside: auto;
/*        border-collapse: collapse;*/
    }

    #ledgerTable thead {
        display: table-header-group; /* Ensure table headers repeat */
    }

    tr {
        page-break-inside: auto;
    }
}

/* Optional: Apply similar centering for screen preview */
.container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%; /* Match with print */
}

/* ============================================================
   GLOBAL SWEETALERT2 DARK MODE & LIGHT MODE THEMING
   ============================================================ */

/* --- DARK MODE STYLES --- */
body.dark-mode .swal2-popup,
[data-bs-theme="dark"] .swal2-popup,
html.dark-mode .swal2-popup,
body.dark-theme .swal2-popup {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6) !important;
    border-radius: 12px !important;
}

body.dark-mode .swal2-title,
[data-bs-theme="dark"] .swal2-title,
html.dark-mode .swal2-title,
body.dark-theme .swal2-title {
    color: #ffffff !important;
}

body.dark-mode .swal2-html-container,
body.dark-mode .swal2-content,
[data-bs-theme="dark"] .swal2-html-container,
[data-bs-theme="dark"] .swal2-content,
html.dark-mode .swal2-html-container,
html.dark-mode .swal2-content,
body.dark-theme .swal2-html-container {
    color: #cbd5e1 !important;
}

body.dark-mode .swal2-input,
body.dark-mode .swal2-textarea,
body.dark-mode .swal2-select,
[data-bs-theme="dark"] .swal2-input,
[data-bs-theme="dark"] .swal2-textarea,
[data-bs-theme="dark"] .swal2-select,
html.dark-mode .swal2-input,
html.dark-mode .swal2-textarea,
html.dark-mode .swal2-select {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

body.dark-mode .swal2-input:focus,
body.dark-mode .swal2-textarea:focus,
body.dark-mode .swal2-select:focus,
[data-bs-theme="dark"] .swal2-input:focus,
[data-bs-theme="dark"] .swal2-textarea:focus,
[data-bs-theme="dark"] .swal2-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}

body.dark-mode .swal2-footer,
[data-bs-theme="dark"] .swal2-footer,
html.dark-mode .swal2-footer {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
}

body.dark-mode .swal2-close,
[data-bs-theme="dark"] .swal2-close,
html.dark-mode .swal2-close {
    color: #94a3b8 !important;
}

body.dark-mode .swal2-close:hover,
[data-bs-theme="dark"] .swal2-close:hover {
    color: #ffffff !important;
}

body.dark-mode .swal2-validation-message,
[data-bs-theme="dark"] .swal2-validation-message,
html.dark-mode .swal2-validation-message {
    background-color: #334155 !important;
    color: #f8fafc !important;
}

body.dark-mode .swal2-timer-progress-bar,
[data-bs-theme="dark"] .swal2-timer-progress-bar {
    background: #3b82f6 !important;
}

/* Dark mode backdrop overlay fix - transparent background */
body.dark-mode .swal2-container,
[data-bs-theme="dark"] .swal2-container {
    background-color: transparent !important;
    backdrop-filter: none !important;
}

/* Ensure toast and history containers never dim background */
.swal2-container.swal2-top-end,
.swal2-container.swal2-top-start,
.swal2-container.swal2-top,
.swal2-container.swal2-bottom-end,
.swal2-container.swal2-bottom-start,
.swal2-container.swal2-bottom,
body.swal2-toast-shown .swal2-container {
    background-color: transparent !important;
    backdrop-filter: none !important;
    pointer-events: none !important;
}

.swal2-container .swal2-popup {
    pointer-events: auto !important;
}

/* --- LIGHT MODE STYLES --- */
body.light-mode .swal2-popup,
[data-bs-theme="light"] .swal2-popup,
body.light-theme .swal2-popup,
html:not(.dark-mode) .swal2-popup {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
}

body.light-mode .swal2-title,
[data-bs-theme="light"] .swal2-title,
html:not(.dark-mode) .swal2-title {
    color: #0f172a !important;
}

body.light-mode .swal2-html-container,
[data-bs-theme="light"] .swal2-html-container,
html:not(.dark-mode) .swal2-html-container {
    color: #334155 !important;
}

body.light-mode .swal2-input,
body.light-mode .swal2-textarea,
body.light-mode .swal2-select,
[data-bs-theme="light"] .swal2-input,
[data-bs-theme="light"] .swal2-textarea,
[data-bs-theme="light"] .swal2-select {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}
