body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background-color: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Wide container variant for report pages using 1400px reference width */
.container.wide {
    max-width: 1400px;
}

/* Full-width responsive container */
.container.fluid {
    max-width: none;
}

.results-center {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: 30px;
}

.content-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.content-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

.search-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.search-form .form-group {
    margin-bottom: 15px;
}

.search-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.search-form .form-group input,
.search-form .form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-form .form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Utility: make action buttons expand equally when needed */
.form-actions.equal > * {
    flex: 1;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.data-table th {
    background-color: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    color: #333;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.image-button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.image-button:hover {
    background-color: #1976D2;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 1200px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    animation: popIn 0.2s;
}

@keyframes popIn {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #333;
    text-decoration: none;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.image-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.image-item img:hover {
    transform: scale(1.05);
}

.image-caption {
    padding: 10px;
    background-color: #f9f9f9;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px 0;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #2196F3;
}

.pagination .active {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}

.pagination .disabled {
    color: #999;
    cursor: not-allowed;
}

.footer {
    margin-top: auto;
    background-color: #fff;
    padding: 20px;
    text-align: center;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.footer-logo {
    max-height: 40px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .search-form {
        padding: 15px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .image-grid {
        grid-template-columns: 1fr;
    }
}

/* Form styling */
.terminal-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

input[type="text"],
input[type="password"],
select.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
select.form-control:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* Form buttons */
.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #2196F3;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
    text-decoration: none;
    color: #333;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-table th {
    background-color: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    white-space: nowrap;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.table-responsive.stretch {
    overflow-x: auto;
    margin: 0 -20px;
    padding: 0 20px;
    width: calc(100% + 40px);
}

@media (max-width: 768px) {
    .table-responsive.stretch {
        margin: 0 -10px;
        padding: 0 10px;
        width: calc(100% + 20px);
    }
}

/* Status indicators */
.status-active,
.status-disabled,
.override-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    min-width: 100px;
}

.status-active {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-disabled {
    background-color: #ffebee;
    color: #c62828;
}

.override-status-yes {
    background-color: #e3f2fd;
    color: #1976d2;
}

.override-status-warning {
    background-color: #fff3e0;
    color: #f57c00;
}

/* Action buttons */
.button-container {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
}

.action-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: white;
    min-width: 90px;
    transition: opacity 0.2s;
}

.action-button:hover {
    opacity: 0.9;
}

.edit-button {
    background-color: #2196F3;
}

.activate-button {
    background-color: #4CAF50;
}

.deactivate-button {
    background-color: #FFA726;
}

.delete-button {
    background-color: #f44336;
}

/* Messages */
.error,
.success {
    padding: 12px 16px;
    margin: 0 0 20px 0;
    border-radius: 4px;
    font-weight: 500;
}

.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* Back button */
.back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.back-button:hover {
    background-color: #1976D2;
    text-decoration: none;
}

/* Footer duplicate removed to avoid conflicts; see earlier .footer */

.logout {
    color: white;
    text-decoration: none;
    margin-left: 15px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #777;
}

/* Sortable table headers */
th a {
    color: #333;
    text-decoration: none;
    display: block;
}

/* Form Styling Enhancements */
.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

/* --- Unified form and container styling for all pages --- */

.page-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container, .scan-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    padding: 30px 32px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.login-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0;
}

.login-option {
    flex: 1 1 180px;
    background: none;
    color: inherit;
    border: none;
    border-radius: 4px;
    padding: 0 10px;
    min-width: 180px;
}

.login-form, .scan-form, .search-form {
    margin-top: 20px;
    text-align: left;
}

.login-form input, .scan-form input, .search-form input, .login-form select, .search-form select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}

.login-form button, .scan-form button, .search-form button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    background-color: #2196F3;
    color: white;
    font-size: 16px;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.login-form button:hover, .scan-form button:hover, .search-form button:hover {
    background-color: #1976D2;
}

.button-outline-primary {
    background-color: white !important;
    color: #2196F3 !important;
    border: 1px solid #2196F3 !important;
}

.mr-15 { margin-right: 15px; }

.error-message, .error {
    color: #c62828;
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 10px 0 20px 0;
    font-weight: 500;
}

.success {
    color: #2e7d32;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 10px 0 20px 0;
    font-weight: 500;
}

@media (max-width: 700px) {
    .login-container, .scan-container {
        max-width: 98vw;
        padding: 16px 4vw;
    }
    .login-options {
        flex-direction: column;
        gap: 10px;
    }
    .login-option {
        min-width: 0;
        padding: 0;
    }
}

/* --- Standardized button styles for all forms --- */

button, .btn-primary, .btn-secondary, .btn-danger {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, color 0.2s;
    margin: 0 2px;
}

button[type="submit"], .btn-primary {
    background-color: #2196F3;
    color: white;
}
button[type="submit"]:hover, .btn-primary:hover {
    background-color: #1976D2;
}

button[type="button"], .btn-secondary, .logout-btn, .btn-cancel {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}
button[type="button"]:hover, .btn-secondary:hover, .logout-btn:hover, .btn-cancel:hover {
    background-color: #e0e0e0;
    color: #2196F3;
}

.btn-danger, .delete-button {
    background-color: #f44336;
    color: white;
}
.btn-danger:hover, .delete-button:hover {
    background-color: #c62828;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-start;
}

/* Ensure all buttons in forms have consistent font and spacing */
form button {
    font-family: inherit;
    font-size: 15px;
    margin: 0 2px;
}

/* --- Button color conventions and restoration --- */

/* Green image/confirm/success buttons */
.image-button, .success-button {
    background-color: #4CAF50 !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.image-button:hover, .success-button:hover {
    background-color: #388E3C !important;
}

/* Blue primary action buttons */
.primary-button {
    background-color: #2196F3 !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}
.primary-button:hover {
    background-color: #1976D2 !important;
    color: #fff !important;
    text-decoration: none;
}

/* Red cancel/delete/danger buttons */
.btn-danger, .delete-button, .cancel-button {
    background-color: #f44336 !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}
.btn-danger:hover, .delete-button:hover, .cancel-button:hover {
    background-color: #c62828 !important;
    color: #fff !important;
}

/* Scope generic button rules to only plain <button> elements without these classes */
button:not(.image-button):not(.success-button):not(.primary-button):not(.btn-danger):not(.delete-button):not(.cancel-button) {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, color 0.2s;
    margin: 0 2px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}
button:not(.image-button):not(.success-button):not(.primary-button):not(.btn-danger):not(.delete-button):not(.cancel-button):hover {
    background-color: #e0e0e0;
    color: #2196F3;
}

/* .form-buttons for spacing */
.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-start;
}

/* --- Restore side-by-side layout for scan and duplicate containers --- */

.content-wrapper {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    align-items: flex-start;
    justify-content: center;
}

.scan-container {
    flex: 0 0 420px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    padding: 30px 32px;
    margin: 0;
    min-width: 320px;
}

.duplicate-container {
    flex: 1;
    position: sticky;
    top: 20px;
    margin-left: 20px;
    min-width: 320px;
}

.duplicate-warning {
    margin: 0;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    background-color: #dc3545;
    border-radius: 8px;
    color: #fff;
    padding: 20px;
}

@media (max-width: 1000px) {
    .content-wrapper {
        flex-direction: column;
        padding: 10px;
    }
    .scan-container, .duplicate-container {
        width: 100%;
        max-width: 100%;
        margin: 0 0 20px 0;
        min-width: 0;
    }
    .duplicate-container {
        margin-left: 0;
    }
}

/* --- Restore thumbnail sizing for duplicate invoice images --- */

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.image-thumbnail {
    width: 86px;
    height: 86px;
    aspect-ratio: 1;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
}

.image-thumbnail:hover {
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Modal image popout styles --- */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
}
.image-modal[style*="display: flex"] {
    display: flex !important;
}
.image-modal .modal-content {
    display: block;
    margin: 5% auto;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.close-modal {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2100;
}

.status-disabled {
    color: #dc3545;
    font-weight: 500;
}

.status-active {
    color: #28a745;
    font-weight: 500;
}

/* Ensure results grid fills the card width */
.content-card > .table-responsive {
    width: 100%;
    margin: 0;
    padding: 0;
}
.content-card > .table-responsive > .data-table {
    width: 100%;
}

/* Optionally, reduce left/right padding for results card if needed */
.content-card.results-card {
    padding: 0 !important;
}

/* K8 filters grid for full width */
.k8-filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

/* Compact table for more columns */
.data-table th, .data-table td {
    padding: 8px 6px;
    font-size: 14px;
    white-space: nowrap;
}

/* Today's Statistics Cards */
.today-stats-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.today-stats-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3em;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.stats-grid .stat-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stats-grid .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stats-grid .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.stats-grid .stat-label {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.stats-grid .stat-card.duplicates .stat-value {
    color: #dc3545;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
    
    .stats-grid .stat-value {
        font-size: 2rem;
    }
}

/* Filter section styles for consistent admin interface */
.filter-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
    box-sizing: border-box;
}

/* Compact grid filter form layout - 6 columns for tighter spacing */
.filter-section form {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px 15px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive breakpoints for filter grid */
@media (max-width: 1200px) {
    .filter-section form {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1000px) {
    .filter-section form {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .filter-section form {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 450px) {
    .filter-section form {
        grid-template-columns: 1fr;
    }
}

.filter-section .form-group,
.filter-section form .form-group {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    min-width: 0;
}

.filter-section .form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-section label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: bold !important;
    color: #333 !important;
}

.filter-section input,
.filter-section select {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

.filter-section input:focus,
.filter-section select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.filter-form {
    width: 100%;
}

.filter-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Stats container for dashboard-style statistics */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid #2196F3;
}

.stat-card.matched {
    border-left-color: #4CAF50;
}

.stat-card.unmatched-scanned {
    border-left-color: #FF9800;
}

.stat-card.unmatched-k8 {
    border-left-color: #F44336;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

/* Focus metrics section (prominent KPIs like match rates) */
.focus-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 10px 0 24px 0;
}
.focus-card {
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%);
    border: 1px solid #e9e4ff;
}
.focus-card .stat-value {
    font-size: 32px;
}

/* Badge styles for status indicators */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.badge-success {
    background-color: #4CAF50;
    color: white;
}

.badge-warning {
    background-color: #FF9800;
    color: white;
}

.badge-danger {
    background-color: #F44336;
    color: white;
}

.badge-info {
    background-color: #2196F3;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

/* Page header layout */
.page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.page-header h2 {
    margin: 0;
    flex-grow: 1;
}

/* Alert Acknowledgment Styles */
.acknowledge-cell {
    white-space: nowrap;
    text-align: center;
    min-width: 150px;
}

.btn-acknowledge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-acknowledge:hover {
    background-color: #0056b3;
}

.btn-acknowledge:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.btn-acknowledge i {
    font-size: 14px;
}

.acknowledged-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.acknowledged-status i.fa-check {
    font-size: 16px;
    margin-bottom: 2px;
}

.acknowledged-status small {
    color: #666;
    text-align: center;
    line-height: 1.3;
}

.acknowledged-status .fa-sticky-note {
    color: #ffc107;
    font-size: 14px;
    margin-top: 4px;
}

.acknowledged-status .fa-sticky-note:hover {
    color: #ff9800;
}

.resolved-status {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

/* Acknowledged alert row styling - moved to admin_customer_queries.php inline styles for better specificity */

/* ========================================
   Loading Spinner / Query Overlay
   ======================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex !important;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 20px;
    font-size: 16px;
    color: #555;
    font-weight: 500;
}

.loading-subtext {
    margin-top: 8px;
    font-size: 13px;
    color: #888;
}

/* Dark theme variant for better contrast on light backgrounds */
.loading-overlay.dark {
    background: rgba(0, 0, 0, 0.6);
}

.loading-overlay.dark .loading-text,
.loading-overlay.dark .loading-subtext {
    color: #fff;
}

/* Inline spinner for buttons */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* Hide default button text when loading */
.btn-loading .btn-text {
    opacity: 0.7;
}

/* Table loading state - dim rows while loading */
.table-loading {
    opacity: 0.5;
    pointer-events: none;
} 