html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.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;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.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."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Three-breakpoint responsive overrides per blazor-responsive-layout.
   The breakpoints match MainLayout.razor.css so sidebar / button /
   dialog sizing all flip on the same boundaries. */

@media (max-width: 767px) {
    /* Mobile: smaller buttons fit thumb-reach; full-width dialogs. */
    .btn,
    .rz-button,
    button.rz-button {
        height: 40px;
        font-size: 0.8rem;
    }

    .rz-dialog,
    .rz-dialog-content {
        width: 95vw !important;
        max-width: 95vw !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    /* Tablet: dialogs scale to 80% of the viewport. */
    .rz-dialog,
    .rz-dialog-content {
        width: 80vw !important;
        max-width: 80vw !important;
    }
}

.loading-spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

div[style*="display: flex;"] {
    flex-wrap: wrap;
}

.RazdenTemplateForm {
    flex: 1;
    display: flex;
    align-items: center;
}

.RazdenTemplateForm > .RadzenTextBox {
    width: 70%;
    margin-right: 1rem;
}

.RazdenTemplateForm > .RadzenButton {
    background-color: #0E82FF;
    border: none;
}

.radzen-button.custom-radzen-button {
    margin-top: 1rem !important;
    margin-right: 1rem !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 3px solid #0E82FF !important;
    color: #0E82FF !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4) !important;
    height: 50px !important;
}

.radzen-button.custom-radzen-button:hover, .radzen-button.custom-radzen-button:focus {
    background-color: #0E82FF !important;
    color: white !important;
    border-color: #0E82FF !important;
    height: 50px !important;
}

/* Dialog centering — force viewport-relative positioning */
.rz-dialog-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Radzen tables and grids responsive */
.rz-datatable, .rz-grid, .rz-data-grid {
    width: 100%;
    overflow-x: auto;
}

.rz-datatable table, .rz-grid table {
    min-width: 100%;
}

/* Radzen cards responsive */
.rz-card {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767.98px) {
    .radzen-button.custom-radzen-button {
        height: 40px !important;
        font-size: 0.8rem !important;
        margin-right: 0.5rem !important;
        margin-top: 0.5rem !important;
    }

    .rz-card {
        padding: 0.5rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .radzen-button.custom-radzen-button {
        height: 45px !important;
        font-size: 0.85rem !important;
    }
}

/* Skeleton loading animation */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 40%;
    margin-bottom: 1rem;
}

.skeleton-button {
    height: 50px;
    width: 180px;
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-input {
    height: 2.5rem;
    width: 100%;
    margin-bottom: 0.75rem;
}

.skeleton-table-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.skeleton-table-cell {
    height: 1rem;
    flex: 1;
}

.skeleton-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

/* File upload drop zone */
.file-upload-zone {
    border: 2px dashed #0E82FF;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    background-color: #f8fbff;
    position: relative;
}

.file-upload-zone:hover {
    background-color: #eaf3ff;
    border-color: #0a6cd8;
}

.file-upload-zone .upload-icon {
    font-size: 2rem;
    color: #0E82FF;
    margin-bottom: 0.5rem;
}

.file-upload-zone .upload-text {
    color: #555;
    font-size: 0.9rem;
}

.file-upload-zone .upload-text strong {
    color: #0E82FF;
}

.file-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Download button with icon */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: #28a745 !important;
    border: none !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 0.4rem 0.8rem !important;
    font-size: 0.85rem !important;
    transition: background-color 0.2s ease;
}

.btn-download:hover {
    background-color: #218838 !important;
}

/* Action buttons group in tables */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-buttons .rz-button {
    font-size: 0.85rem !important;
    padding: 0.35rem 0.7rem !important;
    border-radius: 6px !important;
}

/* Mass action buttons container */
.mass-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.mass-actions .radzen-button.custom-radzen-button {
    margin-top: 0 !important;
    margin-right: 0 !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

/* Report buttons */
.report-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.report-buttons .rz-button {
    border-radius: 8px !important;
    font-weight: 500 !important;
    min-width: 180px !important;
    height: 50px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.report-buttons .rz-button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}