﻿.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

body.ai-chat-open {
    overflow: hidden;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }


#blazor-error-ui {
    display: none;
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: min(430px, calc(100vw - 3rem));
    z-index: 11000;
}

.bisfox-error-card {
    position: relative;
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    overflow: hidden;
    color: #25333c;
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(25, 135, 117, .18);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(31, 52, 61, .18), 0 4px 12px rgba(31, 52, 61, .08);
    backdrop-filter: blur(12px);
}

.bisfox-error-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #299b89, #54c6b2);
}

.bisfox-error-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #258a7a;
    background: #e7f6f3;
    border-radius: 13px;
    font-size: 1.35rem;
}

.bisfox-error-content {
    min-width: 0;
    padding-right: 1.25rem;
}

.bisfox-error-eyebrow {
    display: block;
    margin-bottom: .2rem;
    color: #258a7a;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.bisfox-error-content h6 {
    margin: 0 0 .35rem;
    color: #25333c;
    font-size: 1rem;
}

.bisfox-error-content p {
    margin: 0 0 1rem;
    color: #68777f;
    font-size: .875rem;
    line-height: 1.5;
}

.bisfox-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.bisfox-error-actions .btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bisfox-error-dismiss {
    cursor: pointer;
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #75838a;
    background: transparent;
    border: 0;
    border-radius: 50%;
}

.bisfox-error-dismiss:hover,
.bisfox-error-dismiss:focus-visible {
    color: #25333c;
    background: #eef3f2;
}

@media (max-width: 575.98px) {
    #blazor-error-ui {
        right: .75rem;
        bottom: .75rem;
        left: .75rem;
        width: auto;
    }

    .bisfox-error-card {
        gap: .75rem;
        padding: 1rem;
        border-radius: 14px;
    }

    .bisfox-error-icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        border-radius: 11px;
    }

    .bisfox-error-content {
        padding-right: .75rem;
    }

    .bisfox-error-actions {
        flex-direction: column;
    }

    .bisfox-error-actions .btn {
        width: 100%;
    }
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4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ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.mud-svg-icon {
    width:35px !important;
}

/* T-Shaped Balance Sheet Mobile Responsive */
@media (max-width: 768px) {
    .t-balance-sheet {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .t-balance-sheet::before {
        display: none !important;
    }
}

/* Table action menus are moved to <body> while open by bootstrap-helpers.js.
   This preserves Bootstrap's horizontal table scrolling without clipping menus. */
table .dropdown-menu.show:not(.table-action-menu-portal) {
    visibility: hidden !important;
}

.table-action-menu-portal.table-action-menu-positioning {
    visibility: hidden !important;
}

.table-action-menu-portal {
    position: fixed !important;
    z-index: 1090 !important;
    transform: none !important;
    visibility: visible !important;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#navbar-nav {
    overflow-y: auto;
    max-height: 90vh;
}


.dash-widget {
    width:240px !important;
}

/* Add custom styles for credit note functionality */

/* Credited invoice row styling */
.table-warning-subtle {
    background-color: rgba(255, 193, 7, 0.05) !important;
}

/* Credit note badge styling */
.badge.bg-warning {
    color: #000 !important;
}

/* Disabled dropdown items for credited invoices */
.dropdown-item.disabled {
    color: #6c757d !important;
    pointer-events: none;
    background-color: transparent;
    opacity: 0.5;
}

.dropdown-item.disabled:hover,
.dropdown-item.disabled:focus {
    color: #6c757d !important;
    text-decoration: none;
    background-color: transparent;
    cursor: not-allowed;
}

/* Credit note info styling in dropdown */
.dropdown-item-text.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.1) !important;
    border-left: 3px solid #ffc107;
    padding: 8px 16px;
    margin: 0;
}

/* Enhanced status badges */
.badge.p-2 {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.75rem;
}

/* Credit note specific styling */
.credit-note-card {
    border-left: 4px solid #ffc107;
}

.credit-note-badge {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Credit note alert styling for invoice details */
.credit-note-alert {
    border-left: 4px solid #ffc107 !important;
    background-color: rgba(255, 193, 7, 0.1) !important;
    border-color: #ffeaa7 !important;
}

.credit-note-alert .btn-outline-warning {
    border-color: #ffc107;
    color: #856404;
}

.credit-note-alert .btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.credit-note-alert .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

/* Animation for credit note indicators */
.credit-note-indicator {
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* Credit notes table styling */
.credit-notes-table .table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.credit-notes-table .table-hover tbody tr:hover {
    background-color: rgba(255, 193, 7, 0.05);
}

/* Credit amount styling */
.credit-amount {
    color: #dc3545 !important;
    font-weight: 600;
}

/* Disabled edit button styling */
.btn.disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

/* Enhanced styling for credited invoice details */
.invoice-details .table-warning-subtle td {
    background-color: rgba(255, 193, 7, 0.08) !important;
}

/* Responsive adjustments for credit note information */
@media (max-width: 768px) {
    .dropdown-item-text.bg-warning-subtle {
        font-size: 0.875rem;
        padding: 6px 12px;
    }
    
    .table-warning-subtle {
        background-color: rgba(255, 193, 7, 0.1) !important;
    }

    .credit-note-alert {
        padding: 1rem !important;
    }

    .credit-note-alert .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Success state for credit note creation */
.credit-note-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

/* Credit note modal enhancements */
.modal-header .modal-title i {
    color: #ffc107;
}

/* Enhanced tooltips for credit note functionality */
.tooltip-credit {
    font-size: 0.875rem;
}

.tooltip-credit .tooltip-inner {
    background-color: #ffc107;
    color: #000;
    max-width: 250px;
}

.tooltip-credit .tooltip-arrow::before {
    border-top-color: #ffc107;
}

/* Card enhancements for credited invoices */
.card.border-warning {
    border-width: 2px !important;
}

/* Navigation breadcrumb enhancement for credit notes section */
.breadcrumb-item.active {
    color: #856404;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* Loading state for credit note operations */
.credit-note-loading {
    position: relative;
    overflow: hidden;
}

.credit-note-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.2), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Print styles for credit note list */
@media print {
    .credit-notes-table .dropdown,
    .pagination-container,
    .btn,
    .search-box {
        display: none !important;
    }
    
    .table-warning-subtle {
        background-color: #f8f9fa !important;
        -webkit-print-color-adjust: exact;
    }
    
    .badge {
        border: 1px solid #000 !important;
        -webkit-print-color-adjust: exact;
    }

    .credit-note-alert {
        border: 2px solid #ffc107 !important;
        -webkit-print-color-adjust: exact;
    }
}

/* anka report */
[title="Save"] {
    display: none;
}

/* Shared responsive action and filter layout.
   Keep table and row-level controls untouched; this only targets page/card toolbars. */
.app-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}

.app-action-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.app-action-group .btn,
.app-filter-action .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.time-entry-filter-actions {
    justify-content: flex-end;
}

.time-entry-employee-filter {
    min-width: 220px;
}

.external-inbox-address {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}

.external-inbox-address-value {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.external-inbox-address-value code {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.external-inbox-address-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.pension-assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: .75rem;
}

.pension-assignment-filter {
    min-width: 260px;
}

@media (max-width: 767.98px) {
    /* Existing list/manage card headers receive the same calm stacking behavior. */
    .card-header > .d-flex:has(> .btn),
    .card-header > .d-flex:has(> a.btn),
    .card-header.d-flex:has(> .btn),
    .card-header.d-flex:has(> .d-flex .btn) {
        align-items: stretch !important;
        flex-wrap: wrap;
        gap: .5rem !important;
    }

    .card-header > .row > [class*="col-auto"] {
        flex: 0 0 100%;
        width: 100%;
    }

    .card-header > .row > [class*="col-auto"] > .btn,
    .app-filter-action .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .app-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .app-action-group {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .app-action-group .btn,
    .app-action-group a.btn,
    .app-action-group label.btn {
        width: 100%;
        margin-left: 0 !important;
        white-space: normal;
    }

    .app-action-group-secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-action-group-secondary > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .time-entry-filter-actions,
    .time-entry-filter-actions > *,
    .time-entry-employee-filter,
    .time-entry-filter-actions .search-box {
        width: 100%;
        min-width: 0;
    }

    .external-inbox-address {
        align-items: stretch;
    }

    .external-inbox-address-value,
    .external-inbox-address-actions {
        width: 100%;
    }

    .external-inbox-address-actions .btn {
        flex: 1 1 auto;
        min-height: 40px;
        margin-left: 0 !important;
    }

    .pension-assignment-header {
        flex-direction: column;
        align-items: stretch;
    }

    .pension-assignment-filter {
        width: 100%;
        min-width: 0;
    }

    .app-filter-grid > [class*="col-"] {
        width: 100%;
    }

    /* Generic top-level toolbar groups used throughout older pages. */
    .card-header > .d-flex:has(> .btn),
    .card-header > .d-flex:has(> a.btn) {
        flex-direction: column;
    }

    .card-header > .d-flex:has(> .btn) > .btn,
    .card-header > .d-flex:has(> a.btn) > a.btn {
        width: 100%;
        min-height: 42px;
        margin-left: 0 !important;
    }

    /* Pagination belongs to the page toolbar, not to the horizontally scrolling table. */
    .card-body .dataTables_paginate,
    .card-body .pagination-container,
    .card-body .pagination-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .card-body .pagination {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: .25rem;
    }

    .card-body .pagination .page-item,
    .card-body .pagination .page-link {
        margin: 0 !important;
    }

    .card-body .pagination .page-link {
        min-width: 40px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: .25rem !important;
    }

    .card-body .row:has(.dataTables_paginate) > [class*="col-"] {
        width: 100%;
        margin-left: 0 !important;
        text-align: center;
    }
}

/* BisFox typography — shared with the public website. */
@font-face {
    font-family: "Manrope";
    src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Sora";
    src: url("../fonts/sora-latin-600-normal.woff2") format("woff2");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Sora";
    src: url("../fonts/sora-latin-700-normal.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

html,
body,
button,
input,
select,
textarea,
.e-control,
.e-css {
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title-box h4,
.card-title {
    font-family: "Sora", "Manrope", system-ui, sans-serif !important;
    letter-spacing: -0.02em;
}

/* .table-responsive.table-card {
    width: 100% !important;
    margin-left: 0;
    margin-right: 0;
}

.table-card {
    overflow: visible !important;
} */
