* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utility Classes */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* ============================================================================
   LEFT SIDEBAR NAVIGATION - Pattern A Style
   ============================================================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 16rem; /* 256px */
    height: 100vh;
    background: white;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    z-index: 40;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-icon {
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sidebar-icon .icon {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.sidebar-brand-text h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.sidebar-brand-text p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.125rem 0 0 0;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.sidebar-link.active {
    background-color: #eff6ff;
    color: #2563eb;
}

.sidebar-link-icon {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-link.active .sidebar-link-icon {
    color: #2563eb;
}

.sidebar-link-label {
    flex: 1;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar span {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout-sidebar {
    background: transparent;
    color: #6b7280;
    border: none;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-logout-sidebar:hover {
    color: #ef4444;
}

/* Main Content Area */
.main-content {
    margin-left: 16rem; /* Match sidebar width */
    min-height: 100vh;
    background: #f8f9fa;
}

.app-container {
    padding: 1.5rem;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .app-container {
        padding: 1rem;
    }
}

/* Legacy container styles - scoped to avoid Tabler conflicts */
.legacy-container {
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.dashboard-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

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

.cards .card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.cards .card:hover {
    transform: translateY(-5px);
}

.cards .card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}

.subtext {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 5px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.status-label {
    font-weight: 600;
    color: #555;
}

.status-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.invoice-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.invoice-form .form-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.invoice-form .form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.invoice-form .form-group select,
.invoice-form .form-group input {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.invoice-form .form-group select:focus,
.invoice-form .form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Custom form button styles - scoped to avoid Tabler conflicts */
.invoice-form .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.invoice-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.invoice-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.invoice-form .btn-secondary {
    background: #f8f9fa;
    color: #667eea;
    border: 2px solid #667eea;
}

.invoice-form .btn-secondary:hover {
    background: #667eea;
    color: white;
}

.invoice-preview,
.invoice-result {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.invoice-preview h3,
.invoice-result h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.preview-details p,
.result-details p {
    margin: 10px 0;
    font-size: 1rem;
}

.preview-details strong,
.result-details strong {
    color: #555;
    display: inline-block;
    width: 150px;
}

.download-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.info-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-card h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.info-card p {
    margin: 8px 0;
}

.info-card a {
    color: #667eea;
    text-decoration: none;
}

.info-card a:hover {
    text-decoration: underline;
}

.event-list {
    margin-top: 20px;
}

.event-list h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.table-container {
    overflow-x: auto;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table-container thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.table-container th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-container td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    color: #555;
}

.table-container tbody tr:hover {
    background: #f8f9fa;
}

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

.breakdown-controls {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #f0f0ff;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.breakdown-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.summary-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.summary-value {
    font-size: 1.3rem;
    color: #667eea;
    font-weight: bold;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

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

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

.takeup-rate {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.takeup-good {
    color: #2e7d32;
    background: #e8f5e9;
}

.takeup-medium {
    color: #f57c00;
    background: #fff3e0;
}

.takeup-low {
    color: #c62828;
    background: #ffebee;
}

/* Statement Management Styles */
.statements-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.statement-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.statement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.statement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.statement-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.statement-status {
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.status-received {
    background: #f3e5f5;
    color: #7b1fa2;
}

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

.statement-details {
    margin-bottom: 15px;
}

.statement-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
}

.statement-label {
    color: #666;
    font-weight: 500;
}

.statement-value {
    color: #333;
    font-weight: 600;
}

.statement-amount {
    font-size: 1.3rem;
    color: #667eea;
    font-weight: 700;
}

.statement-notes {
    margin: 15px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    min-height: 60px;
}

.statement-notes textarea {
    width: 100%;
    min-height: 50px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}

.statement-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.statement-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.statement-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.statement-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.statement-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.statement-btn-secondary:hover {
    background: #f0f0ff;
}

.statement-btn-danger {
    background: #ffebee;
    color: #c62828;
}

.statement-btn-danger:hover {
    background: #ffcdd2;
}

.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.date-input-group label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
}

.date-input-group input {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Legacy Modal Styles - scoped to avoid Tabler conflicts */
.legacy-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.legacy-modal-overlay .modal-content {
    background: white;
    border-radius: 12px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.legacy-modal-overlay .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #e0e0e0;
}

.legacy-modal-overlay .modal-header h2 {
    color: #667eea;
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.legacy-modal-overlay .modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.legacy-modal-overlay .modal-footer {
    padding: 20px 25px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.memberships-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
}

.summary-stat {
    text-align: center;
    color: white;
}

.summary-stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
}

.memberships-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.memberships-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.memberships-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.memberships-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.memberships-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    color: #555;
}

.memberships-table tbody tr {
    transition: background 0.2s ease;
}

.memberships-table tbody tr:hover {
    background: #f8f9fa;
}

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

.membership-row-ignored {
    background: #ffebee !important;
    opacity: 0.7;
}

.membership-row-ignored:hover {
    background: #ffcdd2 !important;
}

.membership-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

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

.loading-spinner {
    background: white;
    padding: 40px 50px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .invoice-form {
        flex-direction: column;
        align-items: stretch;
    }

    .form-group {
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .download-buttons {
        flex-direction: column;
    }

    .legacy-modal-overlay {
        padding: 10px;
    }

    .legacy-modal-overlay .modal-content {
        max-height: 95vh;
    }

    .memberships-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .memberships-table {
        font-size: 0.85rem;
    }

    .memberships-table th,
    .memberships-table td {
        padding: 8px 6px;
    }

    .loading-spinner {
        padding: 30px 40px;
    }

    .spinner {
        width: 40px;
        height: 40px;
    }

    .loading-text {
        font-size: 1rem;
    }
}

/* At-Risk Fees Timeline Modal - scoped to avoid Tabler conflicts */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    overflow-y: auto;
}

.custom-modal .modal-content {
    background-color: #ffffff;
    margin: 3% auto;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 90%;
    animation: slideDown 0.3s ease-out;
}

.custom-modal .modal-content.large-modal {
    max-width: 1100px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.2s;
}

.close-modal:hover {
    opacity: 0.7;
}

.custom-modal .modal-body {
    padding: 30px;
}

/* Timeline Summary */
.timeline-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
}

.summary-stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

/* Timeline Chart */
.timeline-chart {
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.chart-bar {
    margin-bottom: 20px;
}

.chart-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.week-label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.week-amount {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.chart-bar-container {
    background: #f0f0f0;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.5s ease-out;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 50px;
}

.week-subtitle {
    font-size: 0.85rem;
    color: #888;
    margin-top: 4px;
}

/* Timeline Details */
.timeline-details {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.week-section {
    border-bottom: 1px solid #e0e0e0;
    padding: 20px;
}

.week-section:last-child {
    border-bottom: none;
}

.week-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background 0.2s;
}

.week-section-header:hover {
    background: #e9ecef;
}

.week-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.week-summary {
    display: flex;
    gap: 20px;
    align-items: center;
}

.week-fees {
    font-weight: 700;
    font-size: 1.2rem;
    color: #667eea;
}

.week-count {
    font-size: 0.9rem;
    color: #666;
}

.toggle-icon {
    font-size: 1.2rem;
    color: #667eea;
    transition: transform 0.3s;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

.week-memberships {
    margin-top: 15px;
    display: none;
}

.week-memberships.show {
    display: block;
}

.membership-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 15px;
    align-items: center;
}

.membership-item:last-child {
    margin-bottom: 0;
}

.membership-detail {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

.detail-value {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.membership-fee {
    text-align: right;
    font-weight: 700;
    font-size: 1.1rem;
    color: #667eea;
}

/* Clickable card cursor */
.card.clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-modal .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .timeline-summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .membership-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .chart-bar-fill {
        font-size: 0.75rem;
        padding-right: 5px;
    }

    .week-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Active navigation link */
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.past {
    background-color: #e0e0e0;
    color: #666;
}

.status-badge.upcoming {
    background-color: #e3f2fd;
    color: #1976d2;
}

/* Statement cards */
.statements-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.statement-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
}

.statement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.statement-header h3 {
    margin: 0;
    color: #667eea;
}

.statement-details p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.statement-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Events table */
.events-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.events-table th,
.events-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.events-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.events-table tr:hover {
    background-color: #f9f9f9;
}

/* Error message */
.error {
    color: #d32f2f;
    background-color: #ffebee;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #d32f2f;
}

/* Statement Cards - Full functionality */
.statement-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.statement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.statement-number {
    font-size: 1.3rem;
    font-weight: 600;
    color: #667eea;
}

.statement-status {
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-generated { background: #e3f2fd; color: #1976d2; }
.status-sent { background: #fff3e0; color: #f57c00; }
.status-received { background: #e8f5e9; color: #388e3c; }
.status-paid { background: #c8e6c9; color: #2e7d32; }

.statement-details {
    margin-bottom: 15px;
}

.statement-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.statement-label {
    color: #666;
    font-weight: 500;
}

.statement-value {
    color: #333;
}

.statement-amount {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

.date-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.date-input-group {
    display: flex;
    flex-direction: column;
}

.date-input-group label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.date-input-group input,
.date-input-group select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.statement-notes {
    margin: 15px 0;
}

.statement-notes textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
}

.statement-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.statement-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.statement-btn-primary {
    background: #667eea;
    color: white;
}

.statement-btn-primary:hover {
    background: #5568d3;
}

.statement-btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.statement-btn-secondary:hover {
    background: #e0e0e0;
}

.statement-btn-success {
    background: #28a745;
    color: white;
    border: none;
}

.statement-btn-success:hover {
    background: #218838;
}

.billing-reference {
    display: inline-block;
    padding: 8px 12px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Memberships Modal - scoped to avoid Tabler conflicts */
.memberships-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.memberships-modal .modal-content {
    background: white;
    border-radius: 8px;
    padding: 0;
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.memberships-modal .modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.memberships-modal .modal-header h2 {
    margin: 0;
    color: #667eea;
}

.memberships-modal .close-modal {
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.memberships-modal .close-modal:hover {
    color: #333;
}

.memberships-modal .modal-body {
    padding: 20px;
}

.memberships-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.memberships-table th,
.memberships-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.memberships-table th {
    background: #f5f5f5;
    font-weight: 600;
    position: sticky;
    top: 61px;
}

.memberships-table tr:hover {
    background: #f9f9f9;
}

.ignored-membership {
    opacity: 0.5;
    text-decoration: line-through;
}

.ignored-membership td {
    color: #999;
}

/* Statements Table Styles - Simplified */
#statementsContainer {
    overflow-x: auto;
}

.statements-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.statements-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.statements-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.statements-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

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

.btn-view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-view:hover {
    opacity: 0.9;
}

/* Claims Page Styles */
.sync-controls {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.sync-status {
    flex: 1;
}

.sync-status p {
    margin: 5px 0;
}

.sync-status-info {
    color: #0066cc;
    font-weight: 500;
}

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

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

.filter-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-controls label {
    font-weight: 600;
}

.filter-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.claim-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.claim-status-open {
    background-color: #fff3cd;
    color: #856404;
}

.claim-status-pending {
    background-color: #cfe2ff;
    color: #084298;
}

.claim-status-approved {
    background-color: #d1e7dd;
    color: #0f5132;
}

.claim-status-denied {
    background-color: #f8d7da;
    color: #842029;
}

.claim-status-paid {
    background-color: #d1e7dd;
    color: #0f5132;
}

.claim-status-closed {
    background-color: #e2e3e5;
    color: #41464b;
}

.claim-status-cancelled {
    background-color: #e2e3e5;
    color: #6c757d;
    text-decoration: line-through;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

.table-footer {
    margin-top: 15px;
    text-align: right;
    color: #6c757d;
    font-size: 14px;
}

/* Claim Detail Modal - scoped to avoid Tabler conflicts */
.claim-detail-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.claim-detail-modal .modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.claim-detail-modal .modal-header {
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.claim-detail-modal .modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.claim-detail-modal .modal-header .close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.claim-detail-modal .modal-header .close:hover,
.claim-detail-modal .modal-header .close:focus {
    color: #000;
}

.claim-detail-modal .modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.claim-detail-modal .modal-footer {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.claim-detail-section {
    margin-bottom: 25px;
}

.claim-detail-section h3 {
    font-size: 18px;
    color: #495057;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-weight: 600;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 5px;
}

.detail-item span {
    color: #212529;
    font-size: 14px;
}

.detail-item input[type="number"],
.detail-item textarea,
.detail-item .status-dropdown {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.detail-item input[type="number"]:focus,
.detail-item textarea:focus,
.detail-item .status-dropdown:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

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

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Status badges for claims */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-open {
    background-color: #fff3cd;
    color: #856404;
}

.status-pending {
    background-color: #cfe2ff;
    color: #084298;
}

.status-approved {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-closed-paid {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-denied {
    background-color: #f8d7da;
    color: #842029;
}

.status-paid {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-closed {
    background-color: #e2e3e5;
    color: #41464b;
}

/* Financial amounts styling */
.amount-paid {
    color: #0f5132;
    font-weight: 600;
}

/* Link styling in claim details */
.detail-item a {
    color: #0066cc;
    text-decoration: none;
}

.detail-item a:hover {
    text-decoration: underline;
}

/* ============================================================================
   CLAIM NOTES STYLING
   ============================================================================ */

.notes-add-form {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.note-type-select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9em;
}

.notes-add-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.notes-list {
    max-height: 400px;
    overflow-y: auto;
}

.note-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-left: 4px solid #6c757d;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.note-item.note-type-adjuster_note {
    border-left-color: #0d6efd;
    background: #f8f9fa;
}

.note-item.note-type-status_change {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.note-item.note-type-payment {
    border-left-color: #198754;
    background: #f1f9f5;
}

.note-item.note-type-contact {
    border-left-color: #0dcaf0;
    background: #f0f9fd;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85em;
}

.note-type-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #6c757d;
    color: white;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
}

.note-item.note-type-adjuster_note .note-type-badge {
    background: #0d6efd;
}

.note-item.note-type-status_change .note-type-badge {
    background: #ffc107;
    color: #000;
}

.note-item.note-type-payment .note-type-badge {
    background: #198754;
}

.note-item.note-type-contact .note-type-badge {
    background: #0dcaf0;
    color: #000;
}

.note-meta {
    color: #6c757d;
    font-size: 0.9em;
}

.note-content {
    color: #212529;
    line-height: 1.5;
    white-space: pre-wrap;
}

.no-notes,
.loading-notes {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

/* ============================================================================
   TICKET-STYLE CLAIM MODAL
   ============================================================================ */

.ticket-style {
    max-width: 900px !important;
}

.ticket-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.ticket-header-left {
    flex: 1;
}

.ticket-title {
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
    color: white;
}

.ticket-meta {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    opacity: 0.9;
}

.ticket-header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.ticket-header .status-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 6px 16px;
}

.ticket-header .close {
    color: white;
    font-size: 32px;
    opacity: 0.9;
}

.ticket-header .close:hover {
    opacity: 1;
}

.ticket-body {
    padding: 30px;
}

.ticket-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ticket-card-title {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #2d3748;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* Financial Breakdown Card */
.financial-card {
    background: linear-gradient(135deg, #f6f9fc 0%, #ffffff 100%);
    border-left: 4px solid #667eea;
}

.financial-breakdown {
    font-size: 1.05em;
}

.financial-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f5;
}

.financial-row:last-child {
    border-bottom: none;
}

.financial-row.processing-fee {
    background: #fff9e6;
    margin: 0 -10px;
    padding: 10px 10px;
    border-radius: 4px;
}

.financial-row.total {
    background: #e6f2ff;
    margin: 0 -10px;
    padding: 12px 10px;
    border-radius: 4px;
    font-size: 1.15em;
}

.financial-label {
    color: #4a5568;
}

.financial-value {
    color: #2d3748;
    font-weight: 600;
}

.financial-divider {
    height: 1px;
    background: #cbd5e0;
    margin: 15px 0;
}

/* Vendor Payment Card */
.vendor-card {
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
    border-left: 4px solid #48bb78;
}

.vendor-payment-status.unpaid {
    background: #fff5f5;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #fc8181;
}

.vendor-payment-status.paid {
    background: #f0fff4;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #48bb78;
}

.vendor-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.vendor-label {
    color: #4a5568;
    font-weight: 500;
}

.vendor-value {
    color: #2d3748;
    font-weight: 600;
}

.payment-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
}

.payment-status-badge.status-paid {
    background: #c6f6d5;
    color: #22543d;
}

.payment-status-badge.status-unpaid {
    background: #fed7d7;
    color: #742a2a;
}

.vendor-payment-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .ticket-modal .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .notes-list {
        max-height: 300px;
    }

    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ticket-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .financial-row,
    .vendor-row {
        flex-direction: column;
        gap: 5px;
    }
}

/* ============================================================================
   EDITABLE TICKET FIELDS
   ============================================================================ */

.status-select {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 8px 12px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 15px;
}

.status-select:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.status-select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.4);
  border-color: white;
}

.status-select option {
  background: #667eea;
  color: white;
}

.inline-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid #e0e0e0;
  padding: 4px 8px;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  width: 120px;
  text-align: right;
  transition: all 0.2s ease;
}

.inline-input:hover {
  border-bottom-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.inline-input:focus {
  outline: none;
  border-bottom-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.editable-amount {
  display: flex;
  align-items: center;
  gap: 2px;
}

.ticket-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.btn-save {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(72, 187, 120, 0.2);
}

.btn-save:hover {
  background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
  box-shadow: 0 4px 8px rgba(72, 187, 120, 0.3);
  transform: translateY(-1px);
}

.btn-save:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(72, 187, 120, 0.2);
}

/* ============================================================================
   CANCELLED CLAIM STYLING
   ============================================================================ */

.cancelled-banner {
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
  border-left: 5px solid #fc8181;
  border-right: 5px solid #fc8181;
  padding: 15px 30px;
  color: #c53030;
  font-size: 14px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(252, 129, 129, 0.2);
}

.vendor-card-cancelled {
  opacity: 0.7;
  border-left-color: #cbd5e0 !important;
}

.vendor-payment-status.cancelled {
  background: #f7fafc;
  border-left: 4px solid #cbd5e0;
}

.status-cancelled {
  background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
}

/* ========================================
   CLAIMS DASHBOARD STYLES
   ======================================== */

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.dashboard-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a202c;
}

/* Small Button Style */
.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Sync Status - Compact */
.sync-status-compact {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f7fafc;
  border-radius: 0.5rem;
  border-left: 4px solid #cbd5e0;
}

.sync-status-compact p {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  color: #4a5568;
}

/* Dashboard Stats Grid - Main Summary Cards */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.dashboard-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dashboard-icon {
  font-size: 1.75rem;
}

.dashboard-card-header h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-metric {
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0.5rem 0;
  line-height: 1;
}

.dashboard-subtext {
  font-size: 0.875rem;
  color: #718096;
  margin: 0;
}

/* Dashboard Card Color Variants */
.dashboard-card-primary {
  border-left: 4px solid #3182ce;
}

.dashboard-card-primary .dashboard-metric {
  color: #3182ce;
}

.dashboard-card-success {
  border-left: 4px solid #48bb78;
}

.dashboard-card-success .dashboard-metric {
  color: #48bb78;
}

.dashboard-card-info {
  border-left: 4px solid #4299e1;
}

.dashboard-card-info .dashboard-metric {
  color: #4299e1;
}

.dashboard-card-warning {
  border-left: 4px solid #ed8936;
}

.dashboard-card-warning .dashboard-metric {
  color: #ed8936;
}

/* Dashboard Status Grid - Status Breakdown Cards */
.dashboard-status-grid {
  margin-top: 2rem;
}

.dashboard-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 1rem;
}

.dashboard-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.status-card {
  background: white;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.status-icon {
  font-size: 1.5rem;
}

.status-card-header h4 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2d3748;
  flex: 1;
}

.status-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.status-count {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #1a202c;
}

.status-amount {
  font-size: 0.75rem;
  color: #4a5568;
  margin: 0;
}

.status-paid {
  font-size: 0.75rem;
  color: #48bb78;
  font-weight: 600;
  margin: 0;
}

/* Status Card Color Variants */
.status-card-blue {
  border-left: 4px solid #3182ce;
}

.status-card-blue .status-count {
  color: #3182ce;
}

.status-card-yellow {
  border-left: 4px solid #ecc94b;
}

.status-card-yellow .status-count {
  color: #d69e2e;
}

.status-card-purple {
  border-left: 4px solid #805ad5;
}

.status-card-purple .status-count {
  color: #805ad5;
}

.status-card-green {
  border-left: 4px solid #48bb78;
}

.status-card-green .status-count {
  color: #48bb78;
}

.status-card-red {
  border-left: 4px solid #f56565;
}

.status-card-red .status-count {
  color: #f56565;
}

.status-card-gray {
  border-left: 4px solid #a0aec0;
}

.status-card-gray .status-count {
  color: #718096;
}

/* Section Subtitle */
.section-subtitle {
  color: #718096;
  font-size: 0.875rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

/* ========================================
   CLAIM DETAIL FULL PAGE STYLES
   ======================================== */

/* Page Header with Back Button */
.claim-detail-header {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-back {
  align-self: flex-start;
  background: white;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  color: #4a5568;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.claim-detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.claim-detail-title h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
}

/* Two Column Grid Layout */
.claim-detail-grid-2col {
  display: grid;
  grid-template-columns: 45fr 55fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 1200px) {
  .claim-detail-grid-2col {
    grid-template-columns: 1fr;
  }
}

/* Legacy 3-column grid (for backwards compatibility) */
.claim-detail-grid {
  display: grid;
  grid-template-columns: 3fr 4fr 3fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 1400px) {
  .claim-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .claim-detail-right {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .claim-detail-grid {
    grid-template-columns: 1fr;
  }
}

.claim-detail-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Detail Cards */
.detail-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a202c;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.detail-icon {
  font-size: 1.5rem;
}

.detail-field {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f7fafc;
}

.detail-field:last-child {
  border-bottom: none;
}

.detail-field label {
  font-weight: 600;
  color: #4a5568;
  font-size: 0.875rem;
  flex-shrink: 0;
  margin-right: 1rem;
}

.detail-field span {
  color: #1a202c;
  font-size: 0.875rem;
  text-align: right;
}

.detail-description {
  margin: 0.5rem 0 0 0;
  color: #1a202c;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: left;
  background: #f7fafc;
  padding: 0.75rem;
  border-radius: 0.375rem;
}

/* Financial Summary Card */
.detail-card-financial {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border-left: 4px solid #48bb78;
}

.amount-large {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2d3748;
}

.detail-field-total {
  background: #fff5e6;
  padding: 0.75rem !important;
  border-radius: 0.375rem;
  margin: 0.5rem 0;
}

.amount-total {
  font-size: 1.5rem;
  font-weight: 700;
  color: #d69e2e;
}

.detail-divider {
  height: 2px;
  background: #e2e8f0;
  margin: 1rem 0;
}

.detail-field-paid {
  background: #f0fff4;
  padding: 0.75rem !important;
  border-radius: 0.375rem;
}

.amount-paid {
  font-size: 1.25rem;
  font-weight: 700;
  color: #48bb78;
}

.amount-fee {
  color: #ed8936;
  font-weight: 600;
}

/* Claim Type Badge */
.claim-type-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Workflow Timeline */
.detail-card-timeline {
  min-height: 400px;
}

.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.875rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.timeline-marker.completed {
  background: #48bb78;
  color: white;
  border: 3px solid #e6fffa;
}

.timeline-marker.current {
  background: #4299e1;
  color: white;
  border: 3px solid #bee3f8;
  animation: pulse 2s infinite;
}

.timeline-marker.pending {
  background: #f7fafc;
  color: #a0aec0;
  border: 3px solid #e2e8f0;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.timeline-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1a202c;
}

.timeline-item.current .timeline-content h4 {
  color: #4299e1;
}

.timeline-content p {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  color: #718096;
  line-height: 1.5;
}

.timeline-date {
  font-size: 0.75rem;
  color: #a0aec0;
  font-style: italic;
}

/* Adjuster Notes */
.notes-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notes-textarea {
  width: 100%;
  min-height: 150px;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.notes-textarea:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Activity Log */
.activity-log {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f7fafc;
  border-radius: 0.5rem;
  border-left: 3px solid #e2e8f0;
}

.activity-icon {
  font-size: 1.25rem;
}

.activity-text {
  font-size: 0.875rem;
  color: #2d3748;
}

.activity-date {
  font-size: 0.75rem;
  color: #a0aec0;
  white-space: nowrap;
}

/* Quick Actions Card */
.detail-card-actions {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.btn-success {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(72, 187, 120, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(245, 101, 101, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}

/* Documentation Checklist */
.documentation-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.checklist-intro {
  font-size: 0.875rem;
  color: #4a5568;
  margin: 0 0 0.5rem 0;
  padding: 0.75rem;
  background: #f7fafc;
  border-radius: 0.375rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 0.375rem;
  transition: background 0.2s ease;
}

.checklist-item:hover {
  background: #f7fafc;
}

.doc-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  cursor: pointer;
}

.checklist-text {
  font-size: 0.875rem;
  color: #2d3748;
  line-height: 1.5;
}

/* Uploaded Documents */
.document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.document-item:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}

.document-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.document-icon {
  font-size: 1.5rem;
}

.document-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.document-details strong {
  color: #2d3748;
  font-size: 0.9rem;
}

.document-details small {
  color: #718096;
  font-size: 0.8rem;
}

.no-data-small {
  text-align: center;
  padding: 2rem;
  color: #a0aec0;
  font-style: italic;
  font-size: 0.875rem;
}

/* Policy Coverage Reference */
.detail-card-info {
  background: #f0f9ff;
  border-left: 4px solid #3b82f6;
}

.policy-coverage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.coverage-item {
  font-size: 0.8rem;
  color: #1e40af;
  padding: 0.5rem;
  background: #dbeafe;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
}

.policy-terms {
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-top: 1rem;
}

.policy-terms p {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  color: #1e40af;
}

.policy-terms strong {
  color: #1e3a8a;
}

/* Claim-Specific Instructions */
.claim-instructions-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.instruction-block {
  padding: 0.75rem;
  background: #ffffff;
  border-left: 3px solid #3b82f6;
  border-radius: 0.25rem;
}

.instruction-block strong {
  display: block;
  color: #1e3a8a;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.instruction-block p {
  margin: 0;
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.6;
}

.evidence-list,
.rules-list {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
}

.evidence-list li,
.rules-list li {
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.375rem;
}

/* Legacy eligibility styles (kept for backwards compatibility) */
.eligibility-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.eligibility-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.eligibility-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: bold;
  margin-top: 0.125rem;
}

.eligibility-content {
  flex: 1;
}

.eligibility-content strong {
  display: block;
  color: #1e40af;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.eligibility-content p {
  margin: 0;
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Quick Actions Bar (Horizontal) */
.quick-actions-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn-action {
  flex: 1;
  min-width: 100px;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-action-approve {
  background: #10b981;
  color: white;
}

.btn-action-approve:hover {
  background: #059669;
}

.btn-action-deny {
  background: #ef4444;
  color: white;
}

.btn-action-deny:hover {
  background: #dc2626;
}

.btn-action-review {
  background: #3b82f6;
  color: white;
}

.btn-action-review:hover {
  background: #2563eb;
}

.btn-action-progress {
  background: #6b7280;
  color: white;
}

.btn-action-progress:hover {
  background: #4b5563;
}

.btn-action-cancel {
  background: #f59e0b;
  color: white;
}

.btn-action-cancel:hover {
  background: #d97706;
}

/* Policy Limits Warning Card */
.detail-card-warning {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
}

.limit-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: #d97706;
}

/* Claim page alerts - scoped to avoid Tabler conflicts */
.claim-page .alert {
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.claim-page .alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

/* Contact Options */
.contact-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Event and Booking Info Highlights */
.event-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 1rem;
}

.booking-amount {
  font-weight: 700;
  color: #059669;
  font-size: 1.125rem;
}

.detail-field-info {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

/* Claimant Message Styling */
.claimant-message {
  background: #eff6ff;
  padding: 1rem;
  border-left: 3px solid #3b82f6;
  border-radius: 4px;
  font-style: italic;
  color: #1e40af;
  line-height: 1.6;
  margin-top: 0.5rem;
}

/* Editable Financial Fields */
.editable-field {
  background: #fef3c7;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.financial-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid #f59e0b;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  color: #92400e;
  background: white;
  transition: border-color 0.2s ease;
}

.financial-input:focus {
  outline: none;
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.amount-requested {
  color: #6b7280;
  font-weight: 600;
}

/* Section Header with Filters */
.section-header-with-filters {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 2rem;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filter-controls label {
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.filter-select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  background: white;
  font-size: 0.875rem;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 250px;
}

.filter-select:hover {
  border-color: #9ca3af;
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
  .section-header-with-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-select {
    width: 100%;
  }
}

/* ============================================
   WORKFLOW ACCORDION STYLES
   ============================================ */

/* Workflow Step Container */
.workflow-step {
  background: white;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Active Step */
.workflow-step.active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Completed Step */
.workflow-step.completed {
  border-color: #10b981;
  background: #f0fdf4;
}

/* Pending Step */
.workflow-step.pending {
  border-color: #e5e7eb;
  opacity: 0.7;
}

/* Workflow Step Header */
.workflow-step-header {
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
  user-select: none;
}

.workflow-step-header:hover {
  background: #f9fafb;
}

.workflow-step.active .workflow-step-header {
  background: #eff6ff;
}

.workflow-step.completed .workflow-step-header {
  background: #f0fdf4;
}

/* Workflow Step Status */
.workflow-step-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.workflow-step-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Active Step Icon */
.workflow-step.active .workflow-step-icon {
  background: #3b82f6;
  color: white;
}

/* Completed Step Icon */
.workflow-step.completed .workflow-step-icon {
  background: #10b981;
  color: white;
}

/* Pending Step Icon */
.workflow-step.pending .workflow-step-icon {
  background: #e5e7eb;
  color: #9ca3af;
}

.workflow-step-status h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

.workflow-step-date {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Workflow Step Content */
.workflow-step-content {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.workflow-step.collapsed .workflow-step-content {
  max-height: 0;
  padding: 0;
}

.workflow-step-body {
  padding: 1.25rem;
  border-top: 1px solid #e5e7eb;
}

/* Step Instruction */
.step-instruction {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  font-style: italic;
}

/* Step Checklist */
.step-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.step-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 6px;
  transition: background 0.2s ease;
  cursor: pointer;
  font-size: 0.9rem;
  color: #374151;
}

.step-checklist label:hover {
  background: #f9fafb;
}

.step-checklist input[type="checkbox"] {
  margin-top: 0.125rem;
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
}

/* Step Notes */
.step-notes {
  margin-bottom: 1rem;
}

.step-notes label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 0.5rem;
}

.step-notes textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.step-notes textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Step Actions */
.step-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Submission Info */
.submission-info {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.submission-info p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: #374151;
}

.submission-info strong {
  color: #1f2937;
}

.submission-message {
  margin-top: 1rem;
  padding: 1rem;
  background: white;
  border-left: 3px solid #3b82f6;
  border-radius: 4px;
}

.submission-message p {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #4b5563;
  white-space: pre-wrap;
}

/* Review Summary */
.review-summary {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.review-summary p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: #374151;
}

/* Payment Breakdown */
.payment-breakdown {
  background: #f0fdf4;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #d1fae5;
  margin-bottom: 1rem;
}

.payment-breakdown p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: #065f46;
  display: flex;
  justify-content: space-between;
}

.payment-breakdown strong {
  color: #047857;
}

/* Financial Data Section in Adjudication */
.financial-data-section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.financial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.financial-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.financial-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.financial-field.financial-total {
  grid-column: 1 / -1;
  padding-top: 0.75rem;
  border-top: 2px solid #d1d5db;
}

.input-with-currency {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.input-with-currency input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 1rem;
}

.input-with-currency input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.total-display {
  font-size: 1.125rem;
  color: #059669;
  padding: 0.5rem;
  background: white;
  border-radius: 0.375rem;
  border: 2px solid #10b981;
}

@media (max-width: 640px) {
  .financial-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .workflow-step-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .step-actions {
    flex-direction: column;
  }

  .step-actions .btn {
    width: 100%;
  }
}

/* ============================================================================
   WORKFLOW STEP FORM STYLES
   ============================================================================ */

.workflow-step-form {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.step-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e5e7eb;
}

.step-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.step-description {
  color: #6b7280;
  font-size: 0.95rem;
}

/* SLA Indicator */
.sla-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 1rem;
}

.sla-indicator.sla-ok {
  background-color: #d1fae5;
  color: #065f46;
}

.sla-indicator.sla-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.sla-indicator.sla-critical {
  background-color: #fee2e2;
  color: #991b1b;
}

.sla-indicator.sla-overdue {
  background-color: #fecaca;
  color: #7f1d1d;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Form Fields */
.form-fields {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-weight: 500;
  color: #374151;
  font-size: 0.95rem;
}

.form-field .required {
  color: #dc2626;
  margin-left: 0.25rem;
}

.form-control {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

.form-check {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

.form-check-label {
  margin-bottom: 0;
  cursor: pointer;
}

.help-text {
  color: #6b7280;
  font-size: 0.875rem;
  font-style: italic;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

/* Auto-save Indicator */
.autosave-container {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.autosave-indicator {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.autosave-indicator.unsaved {
  color: #92400e;
  background-color: #fef3c7;
}

.autosave-indicator.saving {
  color: #1e40af;
  background-color: #dbeafe;
}

.autosave-indicator.saved {
  color: #065f46;
  background-color: #d1fae5;
}

.autosave-indicator.error {
  color: #991b1b;
  background-color: #fee2e2;
}

/* Workflow Timeline */
.workflow-timeline {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.timeline-header {
  margin-bottom: 2rem;
}

.timeline-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.progress-text {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Timeline Steps */
.timeline-steps {
  position: relative;
}

.timeline-step {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  position: relative;
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 2.5rem;
  bottom: -1rem;
  width: 2px;
  background-color: #e5e7eb;
}

.timeline-step-last::before {
  display: none;
}

.step-marker {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  z-index: 1;
}

.step-completed .step-marker {
  background-color: #10b981;
  color: white;
}

.step-in-progress .step-marker {
  background-color: #3b82f6;
  color: white;
  animation: pulse 2s infinite;
}

.step-pending .step-marker {
  background-color: #e5e7eb;
  color: #9ca3af;
}

.step-content {
  flex: 1;
  padding-top: 0.25rem;
}

.step-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.step-title strong {
  font-size: 1rem;
  color: #1f2937;
}

.step-duration {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: normal;
}

.step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.sla-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.sla-badge.sla-ok {
  background-color: #d1fae5;
  color: #065f46;
}

.sla-badge.sla-breached {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Step Answers */
.step-answers {
  margin-top: 1rem;
}

.step-answers details {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.75rem;
}

.step-answers summary {
  cursor: pointer;
  font-weight: 500;
  color: #667eea;
  user-select: none;
}

.step-answers summary:hover {
  color: #764ba2;
}

.step-answers dl {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
}

.step-answers dt {
  font-weight: 500;
  color: #374151;
}

.step-answers dd {
  color: #6b7280;
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.loading-spinner p {
  color: #6b7280;
  font-size: 0.95rem;
}

/* Error Message */
.error-message {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.error-message h3 {
  color: #991b1b;
  margin-bottom: 0.5rem;
}

.error-message p {
  color: #7f1d1d;
  margin-bottom: 1rem;
}

.error-message button {
  background-color: #dc2626;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.error-message button:hover {
  background-color: #b91c1c;
}

/* Responsive adjustments for workflow forms */
@media (max-width: 768px) {
  .workflow-step-form {
    padding: 1rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .step-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Workflow Step Navigation */
.workflow-navigation {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.workflow-navigation h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  color: #333;
}

.progress-bar {
  background: #e0e0e0;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  background: linear-gradient(90deg, #4CAF50, #66BB6A);
  height: 100%;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.step-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.step-tab {
  flex: 1;
  min-width: 120px;
  padding: 1rem;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.step-tab:hover:not(.disabled) {
  background: #e8f5e9;
  border-color: #4CAF50;
  transform: translateY(-2px);
}

.step-tab.completed {
  background: #e8f5e9;
  border-color: #4CAF50;
}

.step-tab.current {
  background: #e3f2fd;
  border-color: #2196F3;
  border-width: 3px;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.step-tab.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ccc;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

.step-tab.completed .step-number {
  background: #4CAF50;
}

.step-tab.current .step-number {
  background: #2196F3;
}

.step-name {
  font-size: 0.85rem;
  text-align: center;
  font-weight: 500;
  color: #333;
}

.step-check {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  color: #4CAF50;
  font-size: 1.2rem;
}

.step-arrow {
  color: #2196F3;
  font-size: 1rem;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Workflow Step Summary */
.workflow-step-summary {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.workflow-step-summary .step-header h3 {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
}

.completed-badge {
  background: #4CAF50;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.step-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.step-answers {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.step-answers h4 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #333;
}

.answer-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.answer-item:last-child {
  border-bottom: none;
}

.answer-item strong {
  color: #555;
  flex-shrink: 0;
  min-width: 200px;
}

.answer-item span {
  color: #333;
  word-break: break-word;
}

.info-text {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 1rem;
  background: #f5f5f5;
  border-radius: 8px;
}


/* Workflow Timeline Header (Full Width) - Updated */
.workflow-timeline-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1.5rem 2rem;
  margin: 0 -2rem 2rem -2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.workflow-timeline-header .workflow-navigation {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.workflow-timeline-header .workflow-navigation h3 {
  color: white;
  margin: 0 0 1rem 0;
}

.workflow-timeline-header .progress-bar {
  background: rgba(255,255,255,0.2);
}

.workflow-timeline-header .progress-fill {
  background: linear-gradient(90deg, #4CAF50, #66BB6A);
}

.workflow-timeline-header .progress-text {
  color: rgba(255,255,255,0.9);
}

.workflow-timeline-header .step-tab {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
}

.workflow-timeline-header .step-tab:hover:not(.disabled) {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}

.workflow-timeline-header .step-tab.completed {
  background: rgba(76, 175, 80, 0.3);
  border-color: #4CAF50;
}

.workflow-timeline-header .step-tab.current {
  background: rgba(33, 150, 243, 0.3);
  border-color: #2196F3;
}

.workflow-timeline-header .step-name {
  color: white;
}

/* Reset button in header */
.btn-reset-workflow {
  background: #ff9800;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  margin-left: auto;
  white-space: nowrap;
}

.btn-reset-workflow:hover {
  background: #f57c00;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.claim-detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}


/* ============================================================================
   BADGE TEXT COLOR OVERRIDES
   Ensure white text on dark background badges for better readability
   ============================================================================ */

/* Target all badge variants with dark backgrounds */
.badge.bg-secondary,
.badge.bg-success,
.badge.bg-danger,
.badge.bg-info,
.badge.bg-primary,
.badge.bg-green,
.badge.bg-red,
.badge.bg-purple,
.badge.bg-cyan,
.badge.bg-azure,
.badge.bg-dark,
.badge.bg-indigo,
.badge.bg-pink,
.badge.bg-orange,
.badge.bg-teal,
.status-badge.bg-secondary,
.status-badge.bg-success,
.status-badge.bg-danger,
.status-badge.bg-info,
.status-badge.bg-primary,
.status-badge.bg-green,
.status-badge.bg-red,
.status-badge.bg-purple,
.status-badge.bg-cyan,
.status-badge.bg-azure,
.status-badge.bg-dark,
.status-badge.bg-indigo,
.status-badge.bg-pink,
.status-badge.bg-orange,
.status-badge.bg-teal,
/* Standalone bg classes used as badges */
span.bg-secondary,
span.bg-success,
span.bg-danger,
span.bg-info,
span.bg-primary,
span.bg-green,
span.bg-red,
span.bg-purple,
span.bg-cyan,
span.bg-azure,
span.bg-dark {
  color: #ffffff !important;
}

/* Yellow and warning badges need dark text */
.badge.bg-yellow,
.badge.bg-warning,
.status-badge.bg-yellow,
.status-badge.bg-warning,
span.bg-yellow,
span.bg-warning {
  color: #1e293b !important;
}


/* ============================================================================
   GLOBAL STATUS BADGE SYSTEM
   Use these classes for consistent status badges across the app.
   Usage: <span class="status-badge status-{status}">{status}</span>
   ============================================================================ */

/* Workflow/Billing Queue statuses */
.status-badge.status-pending,
.badge.badge-status-pending {
  background-color: #fef3cd !important;
  color: #856404 !important;
}

.status-badge.status-approved,
.badge.badge-status-approved {
  background-color: #cff4fc !important;
  color: #055160 !important;
}

.status-badge.status-posted,
.badge.badge-status-posted {
  background-color: #d1e7dd !important;
  color: #0f5132 !important;
}

.status-badge.status-rejected,
.badge.badge-status-rejected {
  background-color: #f8d7da !important;
  color: #842029 !important;
}

.status-badge.status-reversed,
.badge.badge-status-reversed {
  background-color: #e2e3e5 !important;
  color: #41464b !important;
}

/* Payment/Invoice statuses */
.status-badge.status-paid,
.badge.badge-status-paid {
  background-color: #d1e7dd !important;
  color: #0f5132 !important;
}

.status-badge.status-partial,
.badge.badge-status-partial {
  background-color: #fff3cd !important;
  color: #664d03 !important;
}

.status-badge.status-open,
.badge.badge-status-open {
  background-color: #cff4fc !important;
  color: #055160 !important;
}

.status-badge.status-overdue,
.badge.badge-status-overdue {
  background-color: #f8d7da !important;
  color: #842029 !important;
}

/* Claim statuses */
.status-badge.status-new,
.badge.badge-status-new {
  background-color: #cff4fc !important;
  color: #055160 !important;
}

.status-badge.status-in-progress,
.status-badge.status-in_progress,
.badge.badge-status-in-progress {
  background-color: #fff3cd !important;
  color: #664d03 !important;
}

.status-badge.status-closed,
.status-badge.status-closed-paid,
.badge.badge-status-closed {
  background-color: #d1e7dd !important;
  color: #0f5132 !important;
}

.status-badge.status-denied,
.badge.badge-status-denied {
  background-color: #f8d7da !important;
  color: #842029 !important;
}

/* General statuses */
.status-badge.status-active,
.badge.badge-status-active {
  background-color: #d1e7dd !important;
  color: #0f5132 !important;
}

.status-badge.status-inactive,
.badge.badge-status-inactive {
  background-color: #e2e3e5 !important;
  color: #41464b !important;
}

.status-badge.status-draft,
.badge.badge-status-draft {
  background-color: #e2e3e5 !important;
  color: #41464b !important;
}

.status-badge.status-billed,
.badge.badge-status-billed {
  background-color: #cff4fc !important;
  color: #055160 !important;
}

/* Document Type badges */
.status-badge.status-invoice {
  background-color: #cff4fc !important;
  color: #055160 !important;
}

.status-badge.status-credit-memo {
  background-color: #fff3cd !important;
  color: #664d03 !important;
}

.status-badge.status-journal-entry {
  background-color: #e2e3e5 !important;
  color: #41464b !important;
}

/* Approval Type badges */
.status-badge.status-auto-post {
  background-color: #fff3cd !important;
  color: #664d03 !important;
}

.status-badge.status-approval-required {
  background-color: #cfe2ff !important;
  color: #084298 !important;
}

.status-badge.status-optional {
  background-color: #e2e3e5 !important;
  color: #41464b !important;
}

/* Ledger Type badges */
.status-badge.status-ar {
  background-color: #d1e7dd !important;
  color: #0f5132 !important;
}

.status-badge.status-ap {
  background-color: #f8d7da !important;
  color: #842029 !important;
}

/* Workflow Completion Summary */
.workflow-complete-summary {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
}

.workflow-complete-summary .text-success {
  color: #198754 !important;
}

.step-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-summary-item {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.75rem 1rem;
}

.step-summary-item.completed {
  border-left: 3px solid #198754;
}

.step-summary-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-summary-header .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #e9ecef;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
}

.step-summary-item.completed .step-number {
  background: #d1e7dd;
  color: #0f5132;
}

.step-summary-header .step-name {
  flex: 1;
  font-weight: 500;
}

.step-summary-details {
  margin-top: 0.5rem;
  padding-left: 2.5rem;
}

/* Collapse Chevron Rotation */
.collapse-chevron {
  transition: transform 0.2s ease;
}

[data-bs-toggle="collapse"][aria-expanded="true"] .collapse-chevron,
[aria-expanded="true"] .collapse-chevron {
  transform: rotate(180deg);
}

/* Workflow Vertical Timeline */
.workflow-vertical-timeline {
  position: relative;
  padding-left: 0;
}

.workflow-vertical-timeline .timeline-item {
  position: relative;
  padding-left: 28px;
  padding-bottom: 16px;
  border-left: 2px solid #dee2e6;
  margin-left: 8px;
}

.workflow-vertical-timeline .timeline-item:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.workflow-vertical-timeline .timeline-item.completed {
  border-left-color: #198754;
}

.workflow-vertical-timeline .timeline-item.current {
  border-left-color: #206bc4;
}

.workflow-vertical-timeline .timeline-marker {
  position: absolute;
  left: -9px;
  top: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.workflow-vertical-timeline .timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dee2e6;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #dee2e6;
}

.workflow-vertical-timeline .timeline-dot.current {
  background: #206bc4;
  box-shadow: 0 0 0 2px #206bc4;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 2px #206bc4; }
  50% { box-shadow: 0 0 0 4px rgba(32, 107, 196, 0.3); }
  100% { box-shadow: 0 0 0 2px #206bc4; }
}

.workflow-vertical-timeline .timeline-content {
  padding-top: 0;
}

.workflow-vertical-timeline .timeline-step-number {
  color: #6c757d;
  font-size: 0.875rem;
}

.workflow-vertical-timeline .timeline-step-name {
  font-size: 0.875rem;
}

.workflow-vertical-timeline .timeline-meta {
  margin-top: 2px;
  padding-left: 1.25rem;
}

.workflow-vertical-timeline .timeline-item.pending .timeline-step-name {
  color: #adb5bd;
}

/* Workflow Steps List (See Full Workflow) */
.workflow-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.workflow-step-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f8f9fa;
}

.workflow-step-row:last-child {
  border-bottom: none;
}

.workflow-step-row .step-checkbox {
  flex-shrink: 0;
}

.workflow-step-row .step-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.workflow-step-row .step-name {
  font-size: 0.875rem;
}

.workflow-step-row .step-action {
  flex-shrink: 0;
}

/* New Workflow Timeline (vertical connected timeline) */
.wf-timeline {
  position: relative;
  padding: 0.5rem 0;
}

.wf-timeline-item {
  display: flex;
  gap: 1rem;
  position: relative;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.wf-timeline-item:hover {
  background: #f8fafc;
}

.wf-timeline-item:not(.last)::before {
  content: '';
  position: absolute;
  left: calc(0.5rem + 11px);
  top: calc(0.75rem + 24px);
  bottom: -0.75rem;
  width: 2px;
  background: #e2e8f0;
}

.wf-timeline-item.completed:not(.last)::before {
  background: #22c55e;
}

.wf-timeline-item.current:not(.last)::before {
  background: linear-gradient(to bottom, #3b82f6 50%, #e2e8f0 50%);
}

.wf-timeline-marker {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  position: relative;
  z-index: 1;
}

.wf-timeline-item.completed .wf-timeline-marker {
  background: #22c55e;
  color: white;
}

.wf-timeline-item.current .wf-timeline-marker {
  background: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.wf-timeline-item.pending .wf-timeline-marker {
  background: #e2e8f0;
}

.wf-marker-pulse {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: wf-pulse 1.5s ease-in-out infinite;
}

@keyframes wf-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.wf-timeline-content {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.wf-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.wf-step-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
}

.wf-timeline-item.completed .wf-step-name {
  color: #1e293b;
}

.wf-timeline-item.current .wf-step-name {
  color: #1e40af;
  font-weight: 600;
}

.wf-timeline-item.pending .wf-step-name {
  color: #94a3b8;
}

.wf-step-status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.wf-step-status.completed {
  background: #dcfce7;
  color: #16a34a;
}

.wf-step-status.current {
  background: #dbeafe;
  color: #2563eb;
}

.wf-step-desc {
  margin: 0.25rem 0 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

.wf-timeline-item.pending .wf-step-desc {
  color: #94a3b8;
}

/* Activity Trail */
.activity-trail {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-content {
  min-width: 0;
}

/* Audit Log Timeline (circles with dotted lines) */
.audit-log-timeline {
  position: relative;
  padding: 0.75rem 0;
}

.audit-log-item {
  display: flex;
  gap: 1rem;
  position: relative;
}

.audit-log-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 20px;
}

.audit-log-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #206bc4;
  border: 2px solid white;
  box-shadow: 0 0 0 2px #206bc4;
  flex-shrink: 0;
  z-index: 1;
}

.audit-log-line {
  width: 2px;
  flex: 1;
  min-height: 30px;
  border-left: 2px dashed #dee2e6;
  margin: 4px 0;
}

.audit-log-item.last .audit-log-line {
  display: none;
}

.audit-log-content {
  flex: 1;
  padding-bottom: 1rem;
}

.audit-log-item.last .audit-log-content {
  padding-bottom: 0;
}

.audit-log-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1e293b;
}

.audit-log-action {
  font-size: 0.8125rem;
  color: #475569;
  margin-top: 2px;
}

.audit-log-meta {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* User Timeline (timestamp left, indicator, content right) */
.user-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.timeline-entry:last-child {
  border-bottom: none;
}

.timeline-time {
  width: 70px;
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: #64748b;
  text-align: right;
  padding-top: 2px;
}

.timeline-indicator {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 2px;
  margin-top: 5px;
}

.timeline-body {
  flex: 1;
  min-width: 0;
}

.timeline-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: 0.025em;
  line-height: 1.3;
}

.timeline-description {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.4;
}

/* 3-Column Status Overview */
.status-column {
  text-align: center;
}

.status-column .status-label {
  margin-bottom: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-column .status-value {
  margin-bottom: 2px;
}

.status-column .status-value .badge {
  font-size: 0.8125rem;
  font-weight: 600;
}

.status-column .status-meta {
  min-height: 1rem;
}

/* Statement Timeline - Clean Minimal Stepper */
.steps-minimal {
  position: relative;
  display: block;
}

.steps-minimal .step-row {
  display: flex !important;
  gap: 14px;
  position: relative;
  align-items: flex-start;
}

.steps-minimal .step-row:not(.step-last) {
  padding-bottom: 20px;
}

/* Vertical connecting line */
.steps-minimal .step-indicator {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 16px;
  position: relative;
}

.steps-minimal .step-row:not(.step-last) .step-indicator::after {
  content: '';
  display: block !important;
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 6px);
  background-color: #e2e8f0;
}

/* Step dot - must be visible */
.steps-minimal .step-dot {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px;
  min-height: 14px;
  border-radius: 50% !important;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  background-color: #9ca3af;
}

.steps-minimal .step-dot.dot-green {
  background-color: #22c55e !important;
}

.steps-minimal .step-dot.dot-blue {
  background-color: #3b82f6 !important;
}

.steps-minimal .step-dot.dot-red {
  background-color: #ef4444 !important;
}

.steps-minimal .step-dot.dot-gray {
  background-color: #9ca3af !important;
}

/* Step content */
.steps-minimal .step-body {
  flex: 1;
  min-width: 0;
  padding-top: 0;
}

.steps-minimal .step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.125rem;
}

.steps-minimal .step-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.steps-minimal .step-desc {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.4;
}

.steps-minimal .step-link {
  font-size: 0.75rem;
  color: #3b82f6;
  text-decoration: none;
  margin-top: 0.25rem;
  display: inline-block;
}

.steps-minimal .step-link:hover {
  text-decoration: underline;
}

/* Light badge colors for status */
.badge.bg-green-lt {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  font-weight: 500;
  font-size: 0.6875rem;
  padding: 0.2em 0.5em;
}

.badge.bg-blue-lt {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  font-weight: 500;
  font-size: 0.6875rem;
  padding: 0.2em 0.5em;
}

.badge.bg-yellow-lt {
  background: rgba(234, 179, 8, 0.12);
  color: #ca8a04;
  font-weight: 500;
  font-size: 0.6875rem;
  padding: 0.2em 0.5em;
}

.badge.bg-red-lt {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  font-weight: 500;
  font-size: 0.6875rem;
  padding: 0.2em 0.5em;
}

/* ============================================================================
   DARK MODE OVERRIDES
   These override hardcoded white backgrounds when dark mode is active
   ============================================================================ */

[data-bs-theme="dark"] {
  /* Base colors */
  --dark-bg-surface: #1a1d21;
  --dark-bg-card: #232629;
  --dark-bg-elevated: #2a2d31;
  --dark-border: #3a3d41;
  --dark-text: #e1e4e8;
  --dark-text-muted: #8b949e;
}

/* Body background */
[data-bs-theme="dark"] body {
  background-color: var(--dark-bg-surface) !important;
  color: var(--dark-text) !important;
}

/* Cards and containers with white backgrounds */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .sidebar,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .popover,
[data-bs-theme="dark"] .tooltip-inner,
[data-bs-theme="dark"] .filter-bar,
[data-bs-theme="dark"] .detail-card,
[data-bs-theme="dark"] .summary-card,
[data-bs-theme="dark"] .stats-card,
[data-bs-theme="dark"] .metric-card,
[data-bs-theme="dark"] .workflow-card,
[data-bs-theme="dark"] .claim-card,
[data-bs-theme="dark"] .invoice-card,
[data-bs-theme="dark"] .account-card,
[data-bs-theme="dark"] .document-card,
[data-bs-theme="dark"] .timeline-card,
[data-bs-theme="dark"] .section {
  background: var(--dark-bg-card) !important;
  border-color: var(--dark-border) !important;
}

/* Catch-all for inline style backgrounds - uses attribute selector */
[data-bs-theme="dark"] [style*="background: white"],
[data-bs-theme="dark"] [style*="background:white"],
[data-bs-theme="dark"] [style*="background: #fff"],
[data-bs-theme="dark"] [style*="background:#fff"] {
  background: var(--dark-bg-card) !important;
}

/* Tables */
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] table {
  --tblr-table-bg: var(--dark-bg-card);
  --tblr-table-striped-bg: var(--dark-bg-elevated);
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] table thead th {
  background: var(--dark-bg-elevated) !important;
  border-color: var(--dark-border) !important;
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th,
[data-bs-theme="dark"] table td,
[data-bs-theme="dark"] table th {
  border-color: var(--dark-border) !important;
}

[data-bs-theme="dark"] .table tbody,
[data-bs-theme="dark"] table tbody,
[data-bs-theme="dark"] .table tbody tr,
[data-bs-theme="dark"] table tbody tr {
  background-color: var(--dark-bg-card) !important;
}

[data-bs-theme="dark"] .table tbody td,
[data-bs-theme="dark"] table tbody td {
  background-color: transparent !important;
  color: var(--dark-text) !important;
}

/* Form controls */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] input[type="text"],
[data-bs-theme="dark"] input[type="number"],
[data-bs-theme="dark"] input[type="email"],
[data-bs-theme="dark"] input[type="date"],
[data-bs-theme="dark"] input[type="search"],
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] select {
  background-color: var(--dark-bg-elevated) !important;
  border-color: var(--dark-border) !important;
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] input::placeholder {
  color: var(--dark-text-muted) !important;
}

/* Sidebar specific */
[data-bs-theme="dark"] .sidebar-footer {
  background: var(--dark-bg-elevated) !important;
  border-color: var(--dark-border) !important;
}

[data-bs-theme="dark"] .sidebar-link:hover {
  background-color: var(--dark-bg-elevated) !important;
}

[data-bs-theme="dark"] .nav-link:hover {
  background-color: var(--dark-bg-elevated) !important;
}

/* Text colors */
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6,
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .page-title {
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] p,
[data-bs-theme="dark"] span,
[data-bs-theme="dark"] label,
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-secondary {
  color: var(--dark-text-muted) !important;
}

/* Borders */
[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-start,
[data-bs-theme="dark"] .border-end,
[data-bs-theme="dark"] hr {
  border-color: var(--dark-border) !important;
}

/* Warning/info backgrounds - softer in dark mode */
[data-bs-theme="dark"] [style*="background: #fff3e0"],
[data-bs-theme="dark"] [style*="background:#fff3e0"],
[data-bs-theme="dark"] [style*="background: #fff3cd"],
[data-bs-theme="dark"] [style*="background:#fff3cd"],
[data-bs-theme="dark"] [style*="background: #fffbeb"],
[data-bs-theme="dark"] [style*="background:#fffbeb"] {
  background: rgba(251, 191, 36, 0.15) !important;
}

/* Success backgrounds */
[data-bs-theme="dark"] [style*="background: #d4edda"],
[data-bs-theme="dark"] [style*="background:#d4edda"],
[data-bs-theme="dark"] [style*="background: #e8f5e9"],
[data-bs-theme="dark"] [style*="background:#e8f5e9"] {
  background: rgba(34, 197, 94, 0.15) !important;
}

/* Danger backgrounds */
[data-bs-theme="dark"] [style*="background: #fff5f5"],
[data-bs-theme="dark"] [style*="background:#fff5f5"],
[data-bs-theme="dark"] [style*="background: #fee"],
[data-bs-theme="dark"] [style*="background:#fee"] {
  background: rgba(239, 68, 68, 0.15) !important;
}

/* Workflow timeline */
[data-bs-theme="dark"] .wf-timeline-item:hover {
  background: var(--dark-bg-elevated) !important;
}

[data-bs-theme="dark"] .wf-timeline-item:not(.last)::before {
  background: var(--dark-border);
}

/* Page header and content areas */
[data-bs-theme="dark"] .page-header,
[data-bs-theme="dark"] .page-body {
  background: var(--dark-bg-surface) !important;
}

/* App container */
[data-bs-theme="dark"] .app-container {
  background: var(--dark-bg-surface) !important;
}

/* List groups */
[data-bs-theme="dark"] .list-group-item {
  background-color: var(--dark-bg-card) !important;
  border-color: var(--dark-border) !important;
  color: var(--dark-text) !important;
}

/* Pagination */
[data-bs-theme="dark"] .page-link {
  background-color: var(--dark-bg-card) !important;
  border-color: var(--dark-border) !important;
  color: var(--dark-text) !important;
}

/* Alert boxes - keep their semantic colors but darken */
[data-bs-theme="dark"] .alert-warning {
  background: rgba(251, 191, 36, 0.2) !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
}

[data-bs-theme="dark"] .alert-info {
  background: rgba(59, 130, 246, 0.2) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

[data-bs-theme="dark"] .alert-success {
  background: rgba(34, 197, 94, 0.2) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
}

[data-bs-theme="dark"] .alert-danger {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

/* Dropdown menus and nested navigation */
[data-bs-theme="dark"] .dropdown-menu {
  background: var(--dark-bg-card) !important;
  border-color: var(--dark-border) !important;
}

[data-bs-theme="dark"] .dropdown-item {
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
  background: var(--dark-bg-elevated) !important;
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .dropdown-item.active,
[data-bs-theme="dark"] .dropdown-item:active {
  background: var(--tblr-primary) !important;
  color: white !important;
}

/* Nav links in sidebar */
[data-bs-theme="dark"] .nav-link {
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .nav-link-title {
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .nav-link-icon {
  color: var(--dark-text-muted) !important;
}

[data-bs-theme="dark"] .nav-link.active {
  background-color: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
}

[data-bs-theme="dark"] .nav-link.active .nav-link-icon,
[data-bs-theme="dark"] .nav-link.active .nav-link-title {
  color: #60a5fa !important;
}

/* Dropdown toggle arrow */
[data-bs-theme="dark"] .dropdown-toggle::after {
  border-top-color: var(--dark-text-muted) !important;
}

/* Navbar vertical (sidebar) specific */
[data-bs-theme="dark"] .navbar-vertical .navbar-nav .nav-link {
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .navbar-vertical .dropdown-menu {
  background: var(--dark-bg-elevated) !important;
}

/* Activity Trail dark mode */
[data-bs-theme="dark"] .activity-item {
  border-color: var(--dark-border) !important;
}

[data-bs-theme="dark"] .activity-icon {
  background: var(--dark-bg-elevated) !important;
}

[data-bs-theme="dark"] .activity-content strong {
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .activity-content p,
[data-bs-theme="dark"] .activity-content small {
  color: var(--dark-text-muted) !important;
}

/* Audit Log Timeline dark mode */
[data-bs-theme="dark"] .audit-log-dot {
  border-color: var(--dark-bg-card) !important;
}

[data-bs-theme="dark"] .audit-log-line {
  border-color: var(--dark-border) !important;
}

[data-bs-theme="dark"] .audit-log-title {
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .audit-log-action {
  color: var(--dark-text-muted) !important;
}

[data-bs-theme="dark"] .audit-log-meta {
  color: #6b7280 !important;
}

/* Timeline items dark mode */
[data-bs-theme="dark"] .timeline-item,
[data-bs-theme="dark"] .timeline-entry {
  background: var(--dark-bg-card) !important;
  border-color: var(--dark-border) !important;
}

[data-bs-theme="dark"] .timeline-item h4,
[data-bs-theme="dark"] .timeline-item strong,
[data-bs-theme="dark"] .timeline-entry h4,
[data-bs-theme="dark"] .timeline-entry strong {
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .timeline-item p,
[data-bs-theme="dark"] .timeline-item small,
[data-bs-theme="dark"] .timeline-entry p,
[data-bs-theme="dark"] .timeline-entry small {
  color: var(--dark-text-muted) !important;
}

[data-bs-theme="dark"] .timeline-icon {
  background: var(--dark-bg-elevated) !important;
}

/* Workflow timeline dark mode */
[data-bs-theme="dark"] .workflow-vertical-timeline .timeline-item {
  background: var(--dark-bg-card) !important;
}

[data-bs-theme="dark"] .wf-step-name {
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .wf-step-desc {
  color: var(--dark-text-muted) !important;
}

/* Activity item card-like styling for dark mode */
[data-bs-theme="dark"] .activity-item {
  background: var(--dark-bg-card) !important;
  border-radius: 8px;
  padding: 1rem !important;
  margin-bottom: 0.75rem !important;
  border: 1px solid var(--dark-border) !important;
}

[data-bs-theme="dark"] .activity-item strong,
[data-bs-theme="dark"] .activity-item .fw-bold,
[data-bs-theme="dark"] .activity-item b {
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .activity-trail strong,
[data-bs-theme="dark"] .activity-trail b,
[data-bs-theme="dark"] .activity-trail .fw-bold {
  color: var(--dark-text) !important;
}

/* Generic strong/bold text in cards for dark mode */
[data-bs-theme="dark"] .card strong,
[data-bs-theme="dark"] .card b,
[data-bs-theme="dark"] .card .fw-bold {
  color: var(--dark-text) !important;
}

/* Card headers and titles */
[data-bs-theme="dark"] .card-header {
  background: var(--dark-bg-elevated) !important;
  border-color: var(--dark-border) !important;
}

[data-bs-theme="dark"] .card-body {
  background: var(--dark-bg-card) !important;
}

/* Workflow step status badges */
[data-bs-theme="dark"] .wf-step-status.completed {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
}

[data-bs-theme="dark"] .wf-step-status.current {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #60a5fa !important;
}

/* Document items dark mode */
[data-bs-theme="dark"] .document-item {
  background: var(--dark-bg-elevated) !important;
  border-color: var(--dark-border) !important;
}

[data-bs-theme="dark"] .document-item:hover {
  background: var(--dark-bg-card) !important;
  border-color: #4a4d51 !important;
}

[data-bs-theme="dark"] .document-info h6,
[data-bs-theme="dark"] .document-info strong,
[data-bs-theme="dark"] .document-item h6,
[data-bs-theme="dark"] .document-item strong {
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .document-info small,
[data-bs-theme="dark"] .document-info p,
[data-bs-theme="dark"] .document-item small,
[data-bs-theme="dark"] .document-item p {
  color: var(--dark-text-muted) !important;
}

[data-bs-theme="dark"] .document-icon {
  color: var(--dark-text-muted) !important;
}

/* Refund Travel brand colors */
.text-rt-primary {
  color: #0060a8 !important;
}

[data-bs-theme="dark"] .text-rt-primary {
  color: #00cfff !important;
}

/* Table rows and table-light dark mode fix */
[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light > td,
[data-bs-theme="dark"] .table-light > th,
[data-bs-theme="dark"] tr.table-light {
  background: var(--dark-bg-elevated) !important;
  color: var(--dark-text) !important;
  --tblr-table-accent-bg: var(--dark-bg-elevated) !important;
}

[data-bs-theme="dark"] .table tbody tr {
  background: var(--dark-bg-card) !important;
}

[data-bs-theme="dark"] .table tbody tr:hover {
  background: var(--dark-bg-elevated) !important;
}

[data-bs-theme="dark"] .table tbody td {
  background: inherit !important;
  color: var(--dark-text) !important;
}

.bg-rt-gradient {
  background: linear-gradient(135deg, #00cfff 0%, #0060a8 100%) !important;
}

.border-rt-primary {
  border-color: #00cfff !important;
}

/* ===========================================
   Dashboard Cards Dark Mode
   =========================================== */

/* Dashboard summary cards */
[data-bs-theme="dark"] .dashboard-card {
  background: var(--dark-bg-card) !important;
  border-color: var(--dark-border) !important;
}

[data-bs-theme="dark"] .dashboard-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .dashboard-card-header h3 {
  color: var(--dark-text-muted) !important;
}

[data-bs-theme="dark"] .dashboard-subtext {
  color: var(--dark-text-muted) !important;
}

/* Status cards */
[data-bs-theme="dark"] .status-card {
  background: var(--dark-bg-card) !important;
  border-color: var(--dark-border) !important;
}

[data-bs-theme="dark"] .status-card:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .status-card-header {
  border-color: var(--dark-border) !important;
}

[data-bs-theme="dark"] .status-card-header h4 {
  color: var(--dark-text) !important;
}

[data-bs-theme="dark"] .status-amount,
[data-bs-theme="dark"] .status-paid {
  color: var(--dark-text-muted) !important;
}

/* Dashboard section title */
[data-bs-theme="dark"] .dashboard-section-title {
  color: var(--dark-text) !important;
}

/* Dashboard status grid container */
[data-bs-theme="dark"] .dashboard-status-grid {
  border-color: var(--dark-border) !important;
}
