@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

html, body {
    font-family: 'Open Sans', '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: #b32121;
    padding: 1rem 1rem 1rem 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Global modal styles */
.modal-backdrop {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100000 !important;
}

.modal-dialog {
    position: relative;
    background: white;
    width: 720px;
    max-width: 94%;
    border-radius: 6px;
    overflow: visible;
    z-index: 100001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
}

.modal-dialog * {
    pointer-events: auto;
}

.modal-dialog .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
}

.modal-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.modal-body {
    padding: 1rem;
}

.modal-dialog .btn-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
}

.modal-dialog .btn-close:hover {
    opacity: 0.7;
}

.modal-dialog .form-control,
.modal-dialog .form-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e3e7ea;
    border-radius: 4px;
}

.modal-dialog .form-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.modal-dialog .btn {
    cursor: pointer;
}

/* About Modal */
.about-modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 100000 !important;
}

.about-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: white !important;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 100001 !important;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.about-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.about-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #163a49;
}

.about-modal-header .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.about-modal-header .btn-close:hover {
    color: #000;
}

.about-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.about-description {
    color: #6c757d;
    margin-bottom: 1rem;
}

.about-table {
    width: 100%;
    border-collapse: collapse;
}

.about-table thead th {
    text-align: left;
    padding: 0.75rem;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.about-table tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}

.about-table tbody tr:hover {
    background: #f8f9fa;
}

.table-name {
    display: inline-block;
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 0.15rem 0.25rem 0.15rem 0;
    color: #495057;
    font-family: 'Consolas', 'Monaco', monospace;
}

.about-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
}

.about-modal-footer .btn-secondary {
    background: #6c757d;
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.about-modal-footer .btn-secondary:hover {
    background: #5a6268;
}

/* About link button */
.about-link {
    background: none;
    border: none;
    color: #0366d6;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    text-decoration: none;
}

.about-link:hover {
    text-decoration: underline;
}

/* User Menu Dropdown - Global Styles */
.user-menu-container {
    position: relative;
    z-index: 1002;
}

.user-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: transparent;
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1003;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: none;
    cursor: pointer !important;
    color: #333;
    font-size: 0.9rem;
    text-align: left;
    text-decoration: none;
    transition: background-color 0.15s;
}

.user-menu-item:hover {
    background-color: #f3f4f6;
    cursor: pointer !important;
}

.user-menu-item svg {
    color: #6b7280;
    flex-shrink: 0;
}

/* ============================================
   Report Overview - Area Cards (Global Styles)
   ============================================ */

/* Area Cards Section - with subtle background */
.report-overview-page .area-cards-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    padding: 1.5rem;
    background-color: #eef2f6;
    border-radius: 0;
    margin-top: 0.5rem;
}

/* Individual Area Card */
.report-overview-page .area-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    min-height: 85px;
    box-shadow: none;
}

/* Left colored panel with count */
.report-overview-page .area-card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    min-width: 90px;
    gap: 0.2rem;
}

/* Icon in left panel */
.report-overview-page .area-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.1rem;
}

.report-overview-page .area-icon svg {
    width: 20px;
    height: 20px;
}

/* Count number */
.report-overview-page .area-count {
    font-family: 'Open Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

/* Right white panel with text */
.report-overview-page .area-card-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1.25rem;
    flex: 1;
    background: #fff;
}

/* "NEW REPORTS" label */
.report-overview-page .area-label {
    font-family: 'Open Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    color: #8b9ba3;
}

/* Area name */
.report-overview-page .area-name {
    font-family: 'Open Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

/* Area icon image styles - global */
.area-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Area Color Variants */

/* Blue - default and steel */
.report-overview-page .area-blue .area-card-left,
.report-overview-page .area-steel .area-card-left {
    background-color: #cce1f2;
    color: #0058a5;
}

.report-overview-page .area-blue .area-name,
.report-overview-page .area-steel .area-name {
    color: #0058a5;
}

/* Green */
.report-overview-page .area-green .area-card-left {
    background-color: #ccebe0;
    color: #009667;
}

.report-overview-page .area-green .area-name {
    color: #009667;
}

/* Orange / Peach */
.report-overview-page .area-orange .area-card-left {
    background-color: #fee4db;
    color: #fb4e13;
}

.report-overview-page .area-orange .area-name {
    color: #fb4e13;
}

/* Red */
.report-overview-page .area-red .area-card-left {
    background-color: #f8d7da;
    color: #dc3545;
}

.report-overview-page .area-red .area-name {
    color: #dc3545;
}

/* Purple */
.report-overview-page .area-purple .area-card-left {
    background-color: #e2d9f3;
    color: #6f42c1;
}

.report-overview-page .area-purple .area-name {
    color: #6f42c1;
}

/* Yellow */
.report-overview-page .area-yellow .area-card-left {
    background-color: #fef3cc;
    color: #fab600;
}

.report-overview-page .area-yellow .area-name {
    color: #fab600;
}

/* Grey */
.report-overview-page .area-grey .area-card-left {
    background-color: #dddcdc;
    color: #575756;
}

.report-overview-page .area-grey .area-name {
    color: #575756;
}

/* Responsive for Area Cards */
@media (max-width: 1200px) {
    .report-overview-page .area-cards-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .report-overview-page .area-cards-section {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* ============================================
   Report Detail Page Styles
   ============================================ */

.report-detail-page {
    padding: 1.5rem 2rem;
    background: #fff;
    min-height: 100vh;
    font-family: 'Open Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Loading */
.report-detail-page .loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 3rem;
    color: #6c757d;
}

/* Back Link */
.report-detail-page .back-link {
    margin-bottom: 1rem;
}

.report-detail-page .back-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.report-detail-page .back-link a:hover {
    text-decoration: underline;
}

.report-detail-page .back-link svg {
    stroke: #0d6efd;
}

/* Header Section */
.report-detail-page .report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.report-detail-page .header-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.report-detail-page .component-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0056b3;
}

.report-detail-page .header-right {
    text-align: right;
}

.report-detail-page .total-price-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.report-detail-page .total-price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff6b3c;
}

/* Status Badge */
.report-detail-page .status-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 4px;
    text-transform: capitalize;
}

.report-detail-page .status-new {
    background-color: #0d6efd;
    color: #fff;
}

.report-detail-page .status-complete {
    background-color: #198754;
    color: #fff;
}

.report-detail-page .status-pending {
    background-color: #ffc107;
    color: #212529;
}

.report-detail-page .status-added {
    background-color: #17a2b8;
    color: #fff;
}

.report-detail-page .status-rejected {
    background-color: #dc3545;
    color: #fff;
}

.report-detail-page .status-default {
    background-color: #6c757d;
    color: #fff;
}

/* Report Info Row */
.report-detail-page .report-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    justify-content: flex-start;
    align-items: flex-start;
}

.report-detail-page .info-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1 1 0;
    min-width: 120px;
    max-width: 220px;
}

.report-detail-page .info-item:last-child {
    flex-grow: 0;
}

.report-detail-page .info-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #8b9ba3;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.report-detail-page .info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
}

/* Content Grid */
.report-detail-page .content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Cards - with left blue border like the old app */
.report-detail-page .card {
    background: #fff;
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
    border-left: 4px solid #0d6efd;
}

.report-detail-page .card-title {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
}

/* Component Card */
.report-detail-page .component-card {
    grid-column: 1;
    grid-row: 1;
}

.report-detail-page .component-content {
    display: flex;
    flex-direction: row-reverse;
    gap: 2rem;
    align-items: flex-start;
}

.report-detail-page .component-image-section {
    flex-shrink: 0;
}

.report-detail-page .component-image-placeholder {
    width: 240px;
    height: 240px;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #adb5bd;
    font-size: 0.85rem;
}

.report-detail-page .component-image-placeholder svg {
    opacity: 0.5;
    width: 64px;
    height: 64px;
}

.report-detail-page .component-image {
    width: 240px;
    height: 240px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
}

.report-detail-page .component-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.report-detail-page .detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.report-detail-page .detail-label {
    font-size: 0.85rem;
    color: #6c757d;
}

.report-detail-page .detail-value {
    font-size: 1rem;
    color: #212529;
}

.report-detail-page .detail-value.highlight {
    color: #0056b3;
    font-weight: 600;
    font-size: 1.05rem;
}

/* Decision Card */
.report-detail-page .decision-card {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
}

.report-detail-page .decision-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.report-detail-page .radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.report-detail-page .radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #0d6efd;
    cursor: pointer;
    margin: 0;
}

.report-detail-page .radio-label {
    font-size: 0.9rem;
    color: #212529;
}

.report-detail-page .form-section {
    margin-bottom: 1rem;
}

.report-detail-page .form-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.4rem;
}

.report-detail-page .form-select {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
}

.report-detail-page .form-select:focus {
    border-color: #0d6efd;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.report-detail-page .form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    resize: vertical;
    font-family: inherit;
    min-height: 70px;
}

.report-detail-page .form-textarea:focus {
    border-color: #0d6efd;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.report-detail-page .finish-button-container {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 1rem;
}

.report-detail-page .btn-finish {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ff6b3c;
    background: #fff;
    border: 1px solid #ff6b3c;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.report-detail-page .btn-finish:hover {
    background: #fff5f2;
}

/* Details Card */
.report-detail-page .details-card {
    grid-column: 1;
    grid-row: 2;
}

.report-detail-page .details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.report-detail-page .detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

/* Action Buttons */
.report-detail-page .action-buttons {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0;
    background: #fff;
}

.report-detail-page .btn-submit {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    background: #0d6efd;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.report-detail-page .btn-submit:hover {
    background: #0b5ed7;
}

.report-detail-page .btn-cancel {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ff6b3c;
    background: #fff;
    border: 1px solid #ff6b3c;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.report-detail-page .btn-cancel:hover {
    background: #fff5f2;
}

.report-detail-page .btn-delete {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    background: #dc3545;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.report-detail-page .btn-delete:hover {
    background: #bb2d3b;
}

/* Alert */
.report-detail-page .alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.report-detail-page .alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

/* Responsive */
@media (max-width: 992px) {
    .report-detail-page .content-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .report-detail-page .component-card {
        grid-column: 1;
        grid-row: 1;
    }

    .report-detail-page .decision-card {
        grid-column: 1;
        grid-row: 2;
    }

    .report-detail-page .details-card {
        grid-column: 1;
        grid-row: 3;
    }

    .report-detail-page .component-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .report-detail-page {
        padding: 1rem;
    }

    .report-detail-page .report-header {
        flex-direction: column;
        gap: 1rem;
    }

    .report-detail-page .header-right {
        text-align: left;
    }

    .report-detail-page .report-info-row {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .report-detail-page .details-grid {
        grid-template-columns: 1fr;
    }

    .report-detail-page .action-buttons {
        flex-wrap: wrap;
    }
}

/* ============================================
   Import Parts CSV - Upload Button Override
   ============================================ */
.upload-btn.btn.btn-outline-primary {
    color: white !important;
    background-color: #ff6b3c !important;
    border-color: #ff6b3c !important;
    border: 1px solid #ff6b3c !important;
}

.upload-btn.btn.btn-outline-primary:hover {
    color: white !important;
    background-color: #e55a2b !important;
    border-color: #e55a2b !important;
}

/* ============================================
   Component Search Modal Styles (ManageCatalogueComponents)
   ============================================ */

/* Large modal for search */
.modal-dialog.modal-dialog-large {
    max-width: 650px;
}

/* Search section layout */
.search-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Search inputs row - inline labels with inputs */
.search-inputs-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
}

.search-input {
    width: 140px;
    padding: 0.4rem 0.6rem;
    font-size: 0.875rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.search-input:focus {
    outline: none;
    border-color: #163a49;
    box-shadow: 0 0 0 2px rgba(22, 58, 73, 0.1);
}

/* Search/Reset buttons on the right of inputs */
.search-action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.btn-search-outline {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #198754;
    background-color: white;
    border: 1px solid #198754;
    border-radius: 4px;
    cursor: pointer;
}

.btn-search-outline:hover:not(:disabled) {
    background-color: #f0fdf4;
}

.btn-reset-outline {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ff6b3c;
    background-color: white;
    border: 1px solid #ff6b3c;
    border-radius: 4px;
    cursor: pointer;
}

.btn-reset-outline:hover {
    background-color: #fff5f2;
}

/* Search/Select buttons and Pagination row */
.search-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 0.5rem;
}

.search-select-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-search-action {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #198754;
    background-color: white;
    border: 1px solid #198754;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-search-action:hover:not(:disabled) {
    background-color: #f0fdf4;
}

.btn-search-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-select-action {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    background-color: #198754;
    border: 1px solid #198754;
    border-radius: 4px;
    cursor: pointer;
}

.btn-select-action:hover:not(:disabled) {
    background-color: #157347;
}

.btn-select-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Pagination */
.search-pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Pagination buttons */
.btn-pagination,
button.btn-pagination {
    width: 26px;
    height: 26px;
    padding: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-pagination:hover:not(:disabled),
button.btn-pagination:hover:not(:disabled) {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.btn-pagination:disabled,
button.btn-pagination:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.btn-pagination svg {
    stroke: #495057;
}

/* Pagination info text */
.pagination-info {
    font-size: 0.8rem;
    color: #6c757d;
    padding: 0 0.5rem;
    white-space: nowrap;
}

/* Search Results Table Container */
.search-results-table-container {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
}

/* Loading state */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 3rem;
    color: #6c757d;
    font-size: 0.875rem;
}

/* No results message */
.no-results {
    padding: 2rem 1.5rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Search Results Table */
.search-results-table {
    width: 100%;
    border-collapse: collapse;
}

.search-results-table thead {
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}

.search-results-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: #163a49;
    border-bottom: 1px solid #dee2e6;
}

.search-results-table th.text-right,
.search-results-table td.text-right {
    text-align: right;
}

.search-results-table td {
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: #495057;
    border-bottom: 1px solid #f0f0f0;
}

.search-results-table tbody tr {
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.search-results-table tbody tr:hover {
    background-color: #f8f9fa;
}

.search-results-table tbody tr.selected {
    background-color: #e8f4fd;
}

.search-results-table tbody tr.selected:hover {
    background-color: #d9edfc;
}

.search-results-table tbody tr.selected td {
    color: #163a49;
    font-weight: 500;
}

/* Hide modal footer for search mode */
.modal-dialog-large .modal-footer:empty {
    display: none;
    padding: 0;
    border: none;
}

/* Radio group for New Item Type */
.radio-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #163a49;
    cursor: pointer;
}

/* Form row spacing */
.form-row {
    margin-bottom: 1rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

/* Select Button (for Add mode footer) */
.btn-select,
button.btn-select {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    background-color: #198754;
    border: 1px solid #198754;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-select:hover:not(:disabled),
button.btn-select:hover:not(:disabled) {
    background-color: #157347;
    border-color: #146c43;
}

.btn-select:disabled,
button.btn-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Cancel Button */
.btn-cancel,
button.btn-cancel {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-cancel:hover,
button.btn-cancel:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

/* Save button */
.btn-save,
button.btn-save {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    background-color: #198754;
    border: 1px solid #198754;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-save:hover,
button.btn-save:hover {
    background-color: #157347;
    border-color: #146c43;
}

/* ============================================
   Warning Modal (Global Styles)
   ============================================ */
.warning-modal {
    position: relative;
    background: #fff !important;
    border-radius: 8px !important;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
    z-index: 100001;
}

.warning-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid #e9ecef !important;
    background: #fff;
}

.warning-modal-header h3 {
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #163a49 !important;
}

.warning-modal-body {
    padding: 1.5rem !important;
    background: #fff;
}

.warning-modal-body p {
    margin: 0 !important;
    color: #495057 !important;
    line-height: 1.5 !important;
    font-size: 0.95rem;
}

.warning-modal-footer {
    display: flex !important;
    gap: 0.75rem !important;
    padding: 1rem 1.5rem !important;
    border-top: 1px solid #e9ecef !important;
    background-color: #f8f9fa !important;
}

.btn-proceed {
    padding: 0.5rem 1rem !important;
    background-color: #ffc107 !important;
    border: 1px solid #ffc107 !important;
    color: #212529 !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem;
}

.btn-proceed:hover:not(:disabled) {
    background-color: #e0a800 !important;
    border-color: #e0a800 !important;
}

.btn-proceed:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.btn-cancel-warning {
    padding: 0.5rem 1rem !important;
    background: #fff !important;
    border: 1px solid #ff6b3c !important;
    color: #ff6b3c !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease;
}

.btn-cancel-warning:hover {
    background-color: #fff5f2 !important;
}

/* Edit Return Button - Global */
.btn-edit-return {
    padding: 0.5rem 1rem !important;
    background: #fff !important;
    border: 1px solid #ff6b3c !important;
    color: #ff6b3c !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease;
}

.btn-edit-return:hover {
    background-color: #fff5f2 !important;
}

/* Close button for modals */
.btn-close-modal {
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    color: #6c757d !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 0 !important;
}

.btn-close-modal:hover {
    color: #333 !important;
}

/* ============================================
   Card Template Variants (Global)
   Applied via .template-* class on .layout-wrapper
   ============================================ */

/* ===================== Gradient ===================== */

.template-gradient .card-top {
    background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 60%, #48b1e8) 100%);
}

.template-gradient .card-top::after {
    display: none;
}

.template-gradient .card-icon svg,
.template-gradient .card-icon svg *,
.template-gradient .card-icon svg use {
    color: #fff;
    stroke: #fff !important;
}

.template-gradient .card-icon-img {
    filter: brightness(0) invert(1);
}

.template-gradient .card-icon-mask {
    background-color: #fff;
}

.template-gradient .card-top {
    --mask-color: #fff;
}

.template-gradient .card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px var(--accent-shadow);
}

/* ===================== Outlined ===================== */

.template-outlined .card {
    border: 2px solid #d1dce6;
}

.template-outlined .card-top {
    background: #fff;
    border-bottom: 3px solid var(--accent);
}

.template-outlined .card-top::after {
    display: none;
}

.template-outlined .card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--accent-shadow);
}

/* ===================== Minimal ===================== */

.template-minimal .card {
    border: 1px solid #e9ecef;
    border-left: 4px solid var(--accent);
    border-radius: 4px;
}

.template-minimal .card-top {
    background: #f8fafc;
    height: 90px;
}

.template-minimal .card-top::after {
    display: none;
}

.template-minimal .card:hover {
    border-left-color: color-mix(in srgb, var(--accent) 70%, #fff);
    box-shadow: 0 2px 8px var(--accent-shadow);
    transform: translateY(-2px);
}

/* ===================== Glass ===================== */

.template-glass .card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.template-glass .card-top {
    background: color-mix(in srgb, var(--accent-bg) 50%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
}

.template-glass .card-top::after {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 40%);
}

.template-glass .card:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: color-mix(in srgb, var(--accent) 25%, transparent);
    box-shadow: 0 8px 32px var(--accent-shadow);
}

.template-glass .card-body {
    background: transparent;
}

/* Account-type segmented toggle (UserManagement modal) */
.account-type-toggle {
    display: inline-flex;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    overflow: hidden;
    background: #f6f8fa;
    padding: 3px;
    gap: 2px;
}

.account-type-toggle .account-type-option {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #57606a;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.account-type-toggle .account-type-option:hover:not(.active):not(.locked) {
    color: #24292f;
    background: #eaeef2;
}

.account-type-toggle .account-type-option.active {
    background: #ffffff;
    color: #0d6efd;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.account-type-toggle .account-type-option.locked {
    cursor: not-allowed;
    opacity: 0.7;
}

.account-type-toggle .account-type-option svg {
    flex-shrink: 0;
}
