:root {
    --brand-blue: #238DC1;
    --brand-teal: #00AEAA;
    --brand-red: #c0392b;
    --brand-blue-dark: #1B6E97;
    --brand-blue-light: #DCE9F4;
    --brand-blue-bg: #EBF3FA;
    --brand-teal-hover: #1F9D98;
    --brand-teal-press: #07796B;
    --brand-teal-dark: #07796B;
    --brand-focus-ring: rgba(35, 141, 193, 0.25);
    --brand-hover-bg: rgba(35, 141, 193, 0.05);
    --bs-primary: #238DC1;
    --bs-primary-rgb: 35, 141, 193;

    /* AI Score colors */
    --score-high: #e67e22;
    --score-mid: #c0392b;
    --score-low: #8e1818;

    /* Shadow scale */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Brand Color Utility Classes
   ======================================== */

.bg-brand-blue {
    background-color: var(--brand-blue) !important;
    color: #fff !important;
}

.bg-brand-teal {
    background-color: var(--brand-teal) !important;
    color: #fff !important;
}

.bg-brand-gradient {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-teal)) !important;
    color: #fff !important;
}

.badge-score-high {
    background-color: var(--score-high) !important;
    color: #fff !important;
}

.badge-score-mid {
    background-color: var(--score-mid) !important;
    color: #fff !important;
}

.badge-score-low {
    background-color: var(--score-low) !important;
    color: #fff !important;
}

/* ========================================
   Utility Classes
   ======================================== */

/* Brand text colors (teal darkened for WCAG AA contrast on white: #2E9E99 = 3.82:1) */
.text-brand-blue { color: var(--brand-blue) !important; }
.text-brand-teal { color: var(--brand-teal-dark) !important; }
.text-brand-red { color: var(--brand-red) !important; }

[data-bs-theme="dark"] .text-brand-blue { color: var(--brand-blue-text) !important; }
[data-bs-theme="dark"] .text-brand-teal { color: var(--brand-teal) !important; }
[data-bs-theme="dark"] .text-brand-red { color: #e05d52 !important; }

/* Brand accent borders */
.border-accent-blue { border-left: 4px solid var(--brand-blue) !important; }
.border-accent-teal { border-left: 4px solid var(--brand-teal) !important; }
.border-accent-warning { border-left: 4px solid #ffc107 !important; }
.border-accent-success { border-left: 4px solid #198754 !important; }
.border-accent-purple { border-left: 4px solid #6f42c1 !important; }

/* Font size utilities (beyond Bootstrap's .small / .fs-*) */
.text-xxs { font-size: 0.7rem !important; }
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.875rem !important; }
.text-lg { font-size: 1.25rem !important; }
.text-xl { font-size: 1.5rem !important; }

/* Icon sizing */
.icon-lg { font-size: 1.5rem; }
.icon-xl { font-size: 2rem; }
.icon-hero { font-size: 3rem; }

/* Interaction */
.clickable { cursor: pointer; }

/* Text display */
.text-pre-wrap { white-space: pre-wrap; }
.text-monospace { font-family: monospace; }

/* Modal/overlay backdrop */
.overlay-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .overlay-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

html, body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a, .btn-link {
    color: var(--brand-blue);
}

.btn-primary {
    color: #fff;
    background-color: var(--brand-blue);
    border-color: var(--brand-blue-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--brand-blue);
}

.content {
    padding-top: 1.1rem;
    animation: pageEnter 0.25s ease-out;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1:focus {
    outline: none;
}

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

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

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

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

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Toast Notifications */
.toast-container {
    z-index: 1090;
    max-height: 100vh;
    overflow: hidden;
}

.toast {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.toast-dismissible {
    animation: slideInRight 0.3s ease-out;
}

.toast-hiding {
    animation: slideOutRight 0.3s ease-in forwards !important;
    pointer-events: none;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
}

.toast-body {
    padding: 0.75rem;
    position: relative;
}

/* Custom close button for better visibility */
.btn-close-toast {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    transition: all 0.2s ease;
}

.btn-close-toast:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.btn-close-toast:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.btn-close-toast i {
    font-size: 0.875rem;
}

/* Progress bar for auto-dismiss countdown */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.2);
    width: 100%;
    animation: progressShrink linear forwards;
}

@keyframes progressShrink {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Color-coded progress bars */
.toast-header.bg-success ~ .toast-body .toast-progress {
    background: rgba(25, 135, 84, 0.4);
}

.toast-header.bg-danger ~ .toast-body .toast-progress {
    background: rgba(220, 53, 69, 0.4);
}

.toast-header.bg-warning ~ .toast-body .toast-progress {
    background: rgba(255, 193, 7, 0.4);
}

.toast-header.bg-info ~ .toast-body .toast-progress {
    background: rgba(13, 202, 240, 0.4);
}

/* Resume Preview */
.resume-preview-wrapper {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.resume-preview-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resume-preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
}

/* Table sorting indicator */
th[style*="cursor: pointer"] {
    user-select: none;
}

th[style*="cursor: pointer"]:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Sortable table headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background-color 0.15s ease-in-out;
}

.sortable-header:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

.sortable-header i {
    font-size: 0.75rem;
    vertical-align: middle;
}

/* Pagination styling */
.pagination {
    margin-top: 1rem;
}

/* Breadcrumb styling */
.breadcrumb {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

/* Alert sizing */
.alert-sm {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0;
}

.alert-sm small {
    font-size: 0.875rem;
}

/* WCAG AA Compliant Badge Colors */
/* Ensure at least 4.5:1 contrast ratio for text inside badges */
.badge.bg-info {
    background-color: var(--brand-blue) !important;
    color: #fff !important;
}

.badge.bg-warning {
    background-color: #ff9e1b !important;
    color: #000 !important;
}

.badge.bg-warning:hover,
.badge.bg-warning:focus {
    color: #000 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
}

/* Status-specific badge improvements */
.badge {
    font-weight: 500;
}

/* Ensure all badges have sufficient contrast */
.badge.bg-success {
    color: #fff !important;
}

.badge.bg-danger {
    color: #fff !important;
}

.badge.bg-dark {
    color: #fff !important;
}

/* ========================================
   Shared Page Header Styles
   ======================================== */

/* Shared accent bar for all page header patterns */
.page-header,
.page-header-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.page-header::after,
.page-header-section::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 20%;
    max-width: 200px;
    min-width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-teal));
    border-radius: 2px;
}

/* page-header: flex layout for title + actions side-by-side */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1,
.page-header-section h1 {
    margin: 0;
    letter-spacing: -0.01em;
}

.page-header .page-subtitle,
.page-header-section .page-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    margin-top: 0.25rem;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header-actions .btn-group-header {
    display: flex;
    gap: 0.5rem;
}

/* ========================================
   Applications Page - New UI/UX Styles
   ======================================== */

/* Filter Card */
.filter-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
    box-shadow: var(--shadow-sm);
}

.filter-card .input-group {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-card .btn {
    transition: all 0.2s ease;
}

.filter-card .btn:hover {
    transform: translateY(-1px);
}

/* Application Cards */
.application-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.application-card:hover {
    box-shadow: var(--shadow-lg) !important;
    transform: translateY(-2px);
    border-color: #dee2e6;
}

.application-card .card-body {
    position: relative;
}

.application-card .job-title {
    color: var(--brand-blue);
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.application-card .job-title:hover {
    color: var(--brand-blue-dark);
}

/* Status Badge Styling */
.status-badge {
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

/* Application Timeline */
.application-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

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

.timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: #e0e0e0;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #dee2e6;
    transition: all 0.2s ease;
}

.timeline-item.active .timeline-dot {
    background-color: var(--brand-blue);
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--brand-blue);
}

/* Review Notes Card */
.review-notes-card {
    border-radius: 0.375rem;
    background-color: #f0f7ff !important;
    animation: slideIn 0.3s ease-out;
}

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

/* Skeleton Loader */
.skeleton-loader {
    background: #f6f7f8;
    border: none;
}

.skeleton-heading {
    height: 1.5rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.375rem;
}

.skeleton-line {
    height: 0.875rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.skeleton-button {
    height: 2.25rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.375rem;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}



/* Button Accessibility */
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.btn:not(:disabled) {
    cursor: pointer;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .application-card {
        margin-bottom: 1rem;
    }

    .application-card .job-title {
        font-size: 1rem;
    }

    .filter-card {
        margin-bottom: 1.5rem;
    }

    .status-badge {
        font-size: 0.875rem;
        padding: 0.375rem 0.5rem;
    }

    .btn-sm {
        padding: 0.4rem 0.6rem;
        font-size: 0.875rem;
    }

    .d-grid gap-2 {
        gap: 0.5rem !important;
    }
}

/* Focus/Outline for Keyboard Navigation */
.btn:focus,
.btn:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.btn-primary:focus,
.btn-primary:focus-visible {
    box-shadow: 0 0 0 3px var(--brand-focus-ring);
}

.btn-danger:focus,
.btn-danger:focus-visible {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

/* Input Focus States */
.form-control:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 0.2rem var(--brand-focus-ring);
}

/* Modal Accessibility Improvements */
.modal {
    backdrop-filter: blur(3px);
}

/* Badge Enhancements */
.badge {
    transition: all 0.2s ease;
}

/* Search Input Enhancements */
.input-group .input-group-text {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    color: #6c757d;
}

.input-group .form-control {
    border: 1px solid #dee2e6;
}

.input-group .form-control:focus {
    border-color: var(--brand-blue);
}

/* Responsive Card Grid */
@media (max-width: 991px) {
    .col-lg-6 {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .col-xl-4 {
        flex: 0 0 auto;
        width: 100%;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .col-lg-6 {
        flex: 0 0 auto;
        width: 50%;
    }
    
    .col-xl-4 {
        flex: 0 0 auto;
        width: 50%;
    }
}

@media (min-width: 1200px) {
    .col-lg-6 {
        flex: 0 0 auto;
        width: 50%;
    }
    
    .col-xl-4 {
        flex: 0 0 auto;
        width: 33.333%;
    }
}

/* ========================================
   Consistent Table Styles
   ======================================== */

.table-responsive {
    border-radius: 0.375rem;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background-color: #f8f9fa;
}

.table thead th {
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.table tbody tr:hover {
    background-color: var(--brand-hover-bg);
    box-shadow: inset 3px 0 0 0 var(--brand-blue);
}

.table.table-dark thead,
.table.table-dark thead th {
    background-color: #000 !important;
    color: #fff !important;
}

/* ========================================
   Consistent Card Styles
   ======================================== */

.card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    padding: 1rem;
}

.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1rem;
}

/* ========================================
   Consistent Modal Styles
   ======================================== */

.modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-top: 3px solid var(--brand-blue);
    padding: 1.25rem;
}

.modal-header .modal-title {
    font-weight: 600;
    color: #212529;
}

.modal-body {
    padding: 1.5rem;
    color: #495057;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
}

.modal-footer .btn {
    min-width: 100px;
}

/* ========================================
   Consistent Alert Styles
   ======================================== */

.alert {
    border-radius: 0.5rem;
    border: 1px solid;
}

.alert-primary {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}



/* ========================================
   Consistent Button Styles
   ======================================== */

.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.btn:not(:disabled) {
    cursor: pointer;
}

/* Button sizes with consistent styling */
.btn-lg {
    padding: 0.75rem 1.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Button focus states */
.btn:focus,
.btn:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.btn-primary:focus,
.btn-primary:focus-visible {
    box-shadow: 0 0 0 3px var(--brand-focus-ring);
}

.btn-success:focus,
.btn-success:focus-visible {
    box-shadow: 0 0 0 3px rgba(28, 184, 65, 0.25);
}

.btn-danger:focus,
.btn-danger:focus-visible {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

.btn-secondary:focus,
.btn-secondary:focus-visible {
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.25);
}

/* ========================================
   Consistent Form Styles
   ======================================== */

.form-control,
.form-select {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 0.2rem var(--brand-focus-ring);
}

.input-group-text {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    color: #6c757d;
}

.input-group .form-control {
    border: 1px solid #dee2e6;
}

.input-group .form-control:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 0.2rem var(--brand-focus-ring);
}

/* ========================================
   Consistent Badge Styles
   ======================================== */

.badge {
    font-weight: 500;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Notification category badges — visible in both light and dark mode */
.notification-category-badge {
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
    font-weight: 500;
}

[data-bs-theme="dark"] .notification-category-badge {
    background-color: var(--dm-surface-raised);
    color: var(--dm-text-secondary);
    border-color: var(--dm-border);
}

/* ========================================
   Reusable Card and Component Styles
   ======================================== */

/* Hover Card - Used for job cards with hover effects */
.hover-card {
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
}

.hover-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.hover-card .text-truncate-3 {
    flex-grow: 1;
}

/* Transition Card - Generic card with subtle hover effects */
.transition-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.transition-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg) !important;
}

/* Job Card - Specialized card for job listings */
.job-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    overflow: hidden;
}

.job-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl) !important;
}

.job-card-header {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-teal) 100%);
    color: white;
    padding: 1.5rem;
}

.job-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Job title wrap utilities. Apply to cells/containers where a full job title
   is rendered so long titles break cleanly instead of forcing the parent
   (usually a table) to grow past its intended width.
   - .job-title-wrap:  wrap rules only, for flexible containers (cards, col-*).
   - .job-title-cell:  wrap rules + 240px max-width for table cells. */
.job-title-wrap {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.job-title-cell {
    max-width: 240px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.job-meta {
    margin-top: 0.75rem;
}

.job-location {
    color: #6c757d;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.job-description {
    color: #495057;
    line-height: 1.6;
    min-height: 60px;
}

/* Text truncation utility */
.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pay Badge - Highlighting pay information */
.pay-badge {
    background-color: var(--brand-blue-bg);
    border-left: 4px solid var(--brand-blue);
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--brand-blue);
}

/* Closing Soon Styling */
.closing-soon {
    background-color: #fff3cd !important;
    font-weight: 600;
    color: #856404;
}

.bg-warning-light {
    background-color: #fff3cd !important;
}

/* Metric Cards - Dashboard metrics styling */
.metric-card {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg) !important;
}

/* Benefits List - For displaying feature lists */
.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    gap: 1rem;
}

.benefit-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.benefit-item h6 {
    color: #212529;
    font-weight: 600;
}

/* Table Row Interactions */
.table-row-clickable {
    transition: background-color 0.2s ease;
}

.table-row-clickable:hover {
    background-color: var(--brand-hover-bg);
}

/* ========================================
   Animations and Keyframes
   ======================================== */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-card {
    position: relative;
    z-index: 1;
    border-radius: 1rem;
    animation: slideInRight 0.5s ease;
}

/* Hero Section Styling */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-decoration {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.hero-decoration-1 {
    width: 400px;
    height: 400px;
    background: white;
    top: -50%;
    right: -10%;
}

.hero-decoration-2 {
    width: 300px;
    height: 300px;
    background: white;
    bottom: -20%;
    left: -5%;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    max-width: 320px;
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.text-white-80 {
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions .btn-group-header {
        width: 100%;
        flex-direction: column;
    }

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

    .table {
        font-size: 0.875rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.5rem 0.75rem;
    }

    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .alert {
        font-size: 0.9rem;
    }

    .hero-section {
        padding: 3rem 0;
    }

    .hero-card {
        margin-top: 2rem;
    }

    .display-4 {
        font-size: 2.2rem;
    }

    .display-6 {
        font-size: 1.5rem;
    }

    .job-card-header {
        padding: 1rem;
    }

    .benefit-item {
        margin-bottom: 0.5rem;
    }

    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .d-flex.flex-wrap {
        flex-direction: column;
    }

    .hero-decoration-1,
    .hero-decoration-2 {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }

    .display-4 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 1rem;
    }

    .job-title {
        font-size: 1rem;
    }
}

/* ========================================
   Skeleton Loaders
   ======================================== */

.skeleton-loader {
    background: #f6f7f8;
    border: 1px solid #e0e0e0;
}

.skeleton-heading {
    height: 1.5rem;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-line {
    height: 0.75rem;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-button {
    height: 2rem;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Success Icon in Alert */
.alert-icon-large {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* Modal Backdrop */
.modal-backdrop-dark {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Icon Colors */
.icon-word {
    color: #2B579A;
}

.icon-docs {
    color: #4285F4;
}

/* Notification Styles */
.notifications-list {
    display: flex;
    flex-direction: column;
}

.notification-item {
    background-color: transparent;
    border: none;
    transition: all 0.2s ease;
}

.notification-item.unread {
    background-color: #f8f9fa;
}

.notification-item.unread:hover {
    background-color: #e9ecef;
}

.notification-item.read {
    opacity: 0.85;
}

.notification-item.read:hover {
    opacity: 1;
}

.notification-icon {
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

.notification-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.notification-card {
    border-left: 4px solid #dee2e6;
    transition: all 0.2s ease;
}

.notification-card.unread {
    background-color: #f8f9fa;
    border-left-color: var(--brand-blue);
}

.notification-card.unread:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notification-card.read {
    opacity: 0.8;
}

/* ===========================
   Document Management Styles
   =========================== */

/* Document Cards */
.document-card {
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
}

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

.document-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modal entrance animation */
.modal.show {
    display: block;
    animation: modalEnter 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-dialog {
    animation: modalSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalEnter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: scale(0.97) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ========================================
   Mobile Sticky Action Bar
   On small screens, fix to bottom of viewport at full width.
   On larger screens, stay sticky within the parent container.
   ======================================== */

.action-bar-sticky {
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.08);
}

@media (max-width: 767.98px) {
    .action-bar-sticky {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1030;
        border-radius: 0;
    }
}

/* Hide the default Blazor reconnection overlay — we use a custom banner instead */
#components-reconnect-modal,
#blazor-reconnect-hide {
    display: none !important;
}

/* ========================================
   Dark Mode Theme Overrides
   Bootstrap 5.3 handles forms, cards, modals,
   tables, badges, and buttons automatically.
   Below are overrides for custom brand styles.
   ======================================== */

[data-bs-theme="dark"] {
    --brand-blue: #238DC1;
    --brand-teal: #00AEAA;
    --brand-blue-dark: #1e7099;
    --brand-blue-light: #1e2a3a;
    --brand-blue-bg: #161c25;
    --brand-hover-bg: rgba(36, 142, 194, 0.08);
    --brand-focus-ring: rgba(36, 142, 194, 0.35);
    --bs-primary: #238DC1;
    --bs-primary-rgb: 36, 142, 194;

    /* Shadow scale (deeper in dark mode) */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.4);

    /* Brighter variant only for text/links that need contrast on dark bg */
    --brand-blue-text: #5bb8e8;
    --signature-ink: #8a9fe8;

    --dm-bg: #121417;
    --dm-surface: #1a1e25;
    --dm-surface-raised: #222730;
    --dm-border: #2e3440;
    --dm-text: #e0e3e8;
    --dm-text-secondary: #8b929e;
    --dm-text-muted: #7f8694;
}

/* ── Body & page background ────────────── */

[data-bs-theme="dark"] body {
    background-color: var(--dm-bg);
    color: var(--dm-text);
}

/* ── Links ────────────────────────────── */

[data-bs-theme="dark"] a,
[data-bs-theme="dark"] .btn-link {
    color: var(--brand-blue-text);
}

/* ── Primary button ───────────────────── */

[data-bs-theme="dark"] .btn-primary {
    background-color: #1b6d96;
    border-color: #165a7c;
    color: #e0e3e8;
}

[data-bs-theme="dark"] .btn-primary:hover {
    background-color: #2080ad;
    border-color: #1b6d96;
    color: #fff;
}

[data-bs-theme="dark"] .btn-outline-primary {
    color: var(--brand-blue-text);
    border-color: var(--brand-blue);
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
}

/* ── Cards ────────────────────────────── */

[data-bs-theme="dark"] .card {
    background-color: var(--dm-surface);
    border-color: var(--dm-border);
}

[data-bs-theme="dark"] .card-header {
    background-color: var(--dm-surface-raised);
    border-bottom-color: var(--dm-border);
    color: var(--dm-text);
}

[data-bs-theme="dark"] .card-footer {
    background-color: var(--dm-surface-raised);
    border-top-color: var(--dm-border);
}

/* ── Tables ───────────────────────────── */

[data-bs-theme="dark"] .table thead {
    background-color: var(--dm-surface-raised) !important;
}

[data-bs-theme="dark"] .table thead th {
    color: var(--dm-text) !important;
    border-bottom-color: var(--dm-border) !important;
    background-color: var(--dm-surface-raised) !important;
}

/* Bootstrap table contextual classes */
[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light th,
[data-bs-theme="dark"] .table-light td {
    background-color: var(--dm-surface-raised) !important;
    color: var(--dm-text) !important;
}

[data-bs-theme="dark"] .table-secondary,
[data-bs-theme="dark"] .table-secondary th,
[data-bs-theme="dark"] .table-secondary td {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: var(--dm-text-muted) !important;
}

[data-bs-theme="dark"] .table-warning {
    --bs-table-bg: rgba(255, 193, 7, 0.08);
    --bs-table-hover-bg: rgba(255, 193, 7, 0.14);
    --bs-table-border-color: var(--dm-border);
    --bs-table-color: var(--dm-text);
    --bs-table-hover-color: var(--dm-text);
}

[data-bs-theme="dark"] .table-danger {
    --bs-table-bg: rgba(220, 53, 69, 0.08);
    --bs-table-hover-bg: rgba(220, 53, 69, 0.14);
    --bs-table-border-color: var(--dm-border);
    --bs-table-color: var(--dm-text);
    --bs-table-hover-color: var(--dm-text);
}

[data-bs-theme="dark"] .table-success {
    --bs-table-bg: rgba(25, 135, 84, 0.08);
    --bs-table-hover-bg: rgba(25, 135, 84, 0.14);
    --bs-table-border-color: var(--dm-border);
    --bs-table-color: var(--dm-text);
    --bs-table-hover-color: var(--dm-text);
}

[data-bs-theme="dark"] .table-info {
    --bs-table-bg: rgba(36, 142, 194, 0.08);
    --bs-table-hover-bg: rgba(36, 142, 194, 0.14);
    --bs-table-border-color: var(--dm-border);
    --bs-table-color: var(--dm-text);
    --bs-table-hover-color: var(--dm-text);
}

[data-bs-theme="dark"] .table-light {
    --bs-table-bg: var(--dm-surface-raised);
    --bs-table-hover-bg: var(--dm-surface-raised);
    --bs-table-border-color: var(--dm-border);
    --bs-table-color: var(--dm-text);
    --bs-table-hover-color: var(--dm-text);
}

[data-bs-theme="dark"] .table-secondary {
    --bs-table-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
    --bs-table-border-color: var(--dm-border);
    --bs-table-color: var(--dm-text-muted);
    --bs-table-hover-color: var(--dm-text-muted);
}

/* Default table rows: force dark background on all cells */
[data-bs-theme="dark"] .table > :not(.table-dark) > tr > td,
[data-bs-theme="dark"] .table > :not(.table-dark) > tr > th,
[data-bs-theme="dark"] .table > :not(.table-dark) > tr {
    background-color: var(--dm-surface) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > td,
[data-bs-theme="dark"] .table-hover > tbody > tr:hover > th {
    background-color: var(--dm-surface-raised) !important;
}


[data-bs-theme="dark"] .table tbody tr:hover {
    background-color: var(--brand-hover-bg);
    box-shadow: inset 3px 0 0 0 var(--brand-blue);
}

[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th {
    border-color: var(--dm-border);
}

/* ── Modals ───────────────────────────── */

[data-bs-theme="dark"] .modal-content {
    background-color: var(--dm-surface);
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--dm-border);
}

[data-bs-theme="dark"] .modal-header {
    background: var(--dm-surface-raised);
    border-bottom-color: var(--dm-border);
    border-top-color: var(--brand-blue);
}

[data-bs-theme="dark"] .modal-header .modal-title {
    color: var(--dm-text);
}

[data-bs-theme="dark"] .modal-body {
    color: var(--dm-text-secondary);
}

[data-bs-theme="dark"] .modal-footer {
    background-color: var(--dm-surface-raised);
    border-top-color: var(--dm-border);
}

/* ── Alerts ───────────────────────────── */

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.3);
    color: #75d4a7;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #f5a0a8;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: rgba(255, 193, 7, 0.12);
    border-color: rgba(255, 193, 7, 0.25);
    color: #ffe08a;
}

[data-bs-theme="dark"] .alert-info,
[data-bs-theme="dark"] .alert-primary {
    background-color: rgba(61, 166, 224, 0.12);
    border-color: rgba(61, 166, 224, 0.25);
    color: #8ad1f5;
}

/* ── Forms ────────────────────────────── */

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: var(--dm-surface);
    border-color: var(--dm-border);
    color: var(--dm-text);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: var(--dm-surface);
    border-color: var(--brand-blue);
    color: var(--dm-text);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--dm-text-muted);
}

[data-bs-theme="dark"] .input-group-text {
    background-color: var(--dm-surface-raised);
    border-color: var(--dm-border);
    color: var(--dm-text-secondary);
}

/* ── Background fills (muted in dark) ─── */

[data-bs-theme="dark"] .bg-primary {
    background-color: #1b6d96 !important;
}

[data-bs-theme="dark"] .bg-info {
    background-color: #1a7a74 !important;
}

[data-bs-theme="dark"] .bg-success {
    background-color: #1a6b3e !important;
}

[data-bs-theme="dark"] .bg-danger {
    background-color: #8b2d37 !important;
}

[data-bs-theme="dark"] .bg-warning {
    background-color: #8a6d1b !important;
    color: #e0e3e8 !important;
}

[data-bs-theme="dark"] .bg-secondary {
    background-color: #3d4450 !important;
}

/* Progress bars: slightly brighter than bg fills so they read on dark track */
[data-bs-theme="dark"] .progress {
    background-color: var(--dm-surface-raised) !important;
}

[data-bs-theme="dark"] .progress-bar.bg-success,
[data-bs-theme="dark"] .progress-bar[class*="bg-success"] {
    background-color: #22874a !important;
}

[data-bs-theme="dark"] .progress-bar.bg-warning,
[data-bs-theme="dark"] .progress-bar[class*="bg-warning"] {
    background-color: #a07d1f !important;
}

[data-bs-theme="dark"] .progress-bar.bg-danger,
[data-bs-theme="dark"] .progress-bar[class*="bg-danger"] {
    background-color: #a33540 !important;
}

[data-bs-theme="dark"] .progress-bar.bg-info,
[data-bs-theme="dark"] .progress-bar[class*="bg-info"] {
    background-color: #208f88 !important;
}

[data-bs-theme="dark"] .progress-bar.bg-primary,
[data-bs-theme="dark"] .progress-bar[class*="bg-primary"] {
    background-color: #2080ad !important;
}

/* ── Badges (brand overrides) ─────────── */

[data-bs-theme="dark"] .badge.bg-info {
    background-color: var(--brand-blue) !important;
}

[data-bs-theme="dark"] .badge.bg-warning {
    background-color: #cc7f00 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .badge.bg-secondary {
    background-color: #4a5568 !important;
}

/* ── Breadcrumbs ──────────────────────── */

[data-bs-theme="dark"] .breadcrumb {
    background-color: var(--dm-surface);
}

/* ── Page header / subtitle ───────────── */

[data-bs-theme="dark"] .page-header,
[data-bs-theme="dark"] .page-header-section {
    border-bottom-color: var(--dm-border);
}

[data-bs-theme="dark"] .page-header .page-subtitle,
[data-bs-theme="dark"] .page-header-section .page-subtitle {
    color: var(--dm-text-secondary);
}

/* ── Filter card ──────────────────────── */

[data-bs-theme="dark"] .filter-card {
    background: var(--dm-surface);
    border-color: var(--dm-border);
}

/* ── Application card ─────────────────── */

[data-bs-theme="dark"] .application-card {
    border-color: var(--dm-border);
}

[data-bs-theme="dark"] .application-card:hover {
    border-color: #3a4050;
}

[data-bs-theme="dark"] .application-card .job-title {
    color: var(--brand-blue-text);
}

[data-bs-theme="dark"] .application-card .job-title:hover {
    color: var(--brand-teal);
}

/* ── Job cards ────────────────────────── */

[data-bs-theme="dark"] .job-card {
    background-color: var(--dm-surface);
    border-color: var(--dm-border);
}

[data-bs-theme="dark"] .job-location {
    color: var(--dm-text-secondary);
}

[data-bs-theme="dark"] .job-description {
    color: var(--dm-text-secondary);
}

/* ── Pay badge ────────────────────────── */

[data-bs-theme="dark"] .pay-badge {
    background-color: rgba(61, 166, 224, 0.1);
    color: var(--brand-blue);
    border-left-color: var(--brand-blue);
}

/* ── Closing soon ─────────────────────── */

[data-bs-theme="dark"] .closing-soon,
[data-bs-theme="dark"] .bg-warning-light {
    background-color: rgba(255, 193, 7, 0.12) !important;
    color: #ffe08a;
}

/* ── Review notes ─────────────────────── */

[data-bs-theme="dark"] .review-notes-card {
    background-color: rgba(61, 166, 224, 0.08) !important;
}

/* ── Timeline ─────────────────────────── */

[data-bs-theme="dark"] .timeline-dot {
    background-color: var(--dm-border);
    border-color: var(--dm-surface);
    box-shadow: 0 0 0 2px var(--dm-border);
}

[data-bs-theme="dark"] .timeline-item.active .timeline-dot {
    background-color: var(--brand-blue);
    box-shadow: 0 0 0 2px var(--dm-surface), 0 0 0 4px var(--brand-blue);
}

/* Application notes panel — the timeline-content card defaults to a near-white
   background via Bootstrap's border utility + implicit body bg, which leaves the
   note text nearly unreadable in dark mode. Promote it to the raised surface and
   re-color the body text. */
[data-bs-theme="dark"] .timeline-content {
    background-color: var(--dm-surface-raised);
    border-color: var(--dm-border) !important;
    color: var(--dm-text);
}

[data-bs-theme="dark"] .note-text {
    color: var(--dm-text);
}

[data-bs-theme="dark"] .note-text.text-muted {
    color: var(--dm-text-muted) !important;
}

/* ── Skeleton loaders ─────────────────── */

[data-bs-theme="dark"] .skeleton-loader {
    background: var(--dm-surface);
    border-color: var(--dm-border);
}

[data-bs-theme="dark"] .skeleton-heading,
[data-bs-theme="dark"] .skeleton-line,
[data-bs-theme="dark"] .skeleton-button {
    background: linear-gradient(90deg, #222730 25%, #2e3440 50%, #222730 75%);
    background-size: 200% 100%;
}

/* ── Notifications ────────────────────── */

[data-bs-theme="dark"] .notification-item.unread {
    background-color: var(--dm-surface);
}

[data-bs-theme="dark"] .notification-item.unread:hover {
    background-color: var(--dm-surface-raised);
}

[data-bs-theme="dark"] .notification-card {
    border-left-color: var(--dm-border);
}

[data-bs-theme="dark"] .notification-card.unread {
    background-color: var(--dm-surface);
    border-left-color: var(--brand-blue);
}

/* ── Document card ────────────────────── */

[data-bs-theme="dark"] .document-card {
    border-color: var(--dm-border);
}

/* ── Hover / transition cards ─────────── */

[data-bs-theme="dark"] .hover-card:hover {
    box-shadow: var(--shadow-md) !important;
}

[data-bs-theme="dark"] .transition-card:hover {
    box-shadow: var(--shadow-lg) !important;
}

[data-bs-theme="dark"] .job-card:hover {
    box-shadow: var(--shadow-xl) !important;
}

/* ── Sortable table headers ───────────── */

[data-bs-theme="dark"] .sortable-header:hover,
[data-bs-theme="dark"] th[style*="cursor: pointer"]:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* ── Benefit items ────────────────────── */

[data-bs-theme="dark"] .benefit-item h6 {
    color: var(--dm-text);
}

/* ── Hero section ─────────────────────── */

[data-bs-theme="dark"] .hero-decoration-1,
[data-bs-theme="dark"] .hero-decoration-2 {
    background: rgba(255, 255, 255, 0.03);
}

/* ── Action bar ───────────────────────── */

[data-bs-theme="dark"] .action-bar-sticky {
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.25);
}

/* ── Validation ───────────────────────── */

[data-bs-theme="dark"] .valid.modified:not([type=checkbox]) {
    outline-color: #2ecc71;
}

[data-bs-theme="dark"] .invalid {
    outline-color: #ff4757;
}

[data-bs-theme="dark"] .validation-message {
    color: #ff6b7a;
}

/* ── Blazor error UI ──────────────────── */

[data-bs-theme="dark"] #blazor-error-ui {
    background: var(--dm-surface);
    border-top-color: var(--dm-border);
    color: var(--dm-text-secondary);
}

/* ── Sidebar & layout ─────────────────── */

[data-bs-theme="dark"] .sidebar {
    background-color: var(--dm-surface) !important;
    border-right-color: var(--dm-border) !important;
}

[data-bs-theme="dark"] .page.no-sidebar .sidebar {
    border-bottom-color: var(--dm-border);
}

/* ── Gradients (muted in dark mode) ───── */

[data-bs-theme="dark"] .top-row {
    background: linear-gradient(90deg, #1a3a52, #1a4a48) !important;
}

[data-bs-theme="dark"] .bg-brand-gradient {
    background: linear-gradient(135deg, #1e5a7a, #1e6b66) !important;
}

[data-bs-theme="dark"] .job-card-header {
    background: linear-gradient(135deg, #1e5a7a, #1e6b66) !important;
}

/* Catch inline-styled gradient modal headers */
[data-bs-theme="dark"] .modal-header[style*="linear-gradient"] {
    background: linear-gradient(135deg, #1e5a7a, #1e6b66) !important;
}

/* Hero section on landing page */
[data-bs-theme="dark"] .hero-section[style*="linear-gradient"] {
    background: linear-gradient(135deg, #1a3a52, #1a4a48) !important;
}

/* ── Dropdown menu (navbar) ───────────── */

[data-bs-theme="dark"] .dropdown-menu {
    background-color: var(--dm-surface) !important;
    border-color: var(--dm-border) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .dropdown-menu .dropdown-item {
    color: #b0b8c4;
}

[data-bs-theme="dark"] .dropdown-menu .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-menu .dropdown-item:focus {
    background-color: rgba(61, 166, 224, 0.1);
    color: #e0e3e8;
}

[data-bs-theme="dark"] .dropdown-menu .dropdown-divider {
    border-color: var(--dm-border);
}

/* ── Nav scrollbar ────────────────────── */

@media (min-width: 641px) {
    [data-bs-theme="dark"] .nav-scrollable:hover {
        scrollbar-color: rgba(255,255,255,0.1) transparent;
    }
}

/* ── Misc Bootstrap helpers we override ── */

[data-bs-theme="dark"] .bg-light {
    background-color: #151820 !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: var(--dm-surface) !important;
}

[data-bs-theme="dark"] .text-dark {
    color: var(--dm-text) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: var(--dm-text-muted) !important;
}

[data-bs-theme="dark"] .text-warning {
    color: #c9a227 !important;
}

[data-bs-theme="dark"] .text-danger {
    color: #c75a5a !important;
}

[data-bs-theme="dark"] .text-success {
    color: #3daa6a !important;
}

[data-bs-theme="dark"] .text-info {
    color: #4da6a0 !important;
}

[data-bs-theme="dark"] .text-primary {
    color: var(--brand-blue-text) !important;
}

[data-bs-theme="dark"] .text-secondary {
    color: var(--dm-text-secondary) !important;
}

[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-top {
    border-color: var(--dm-border) !important;
}

/* ── List group items ─────────────────── */

[data-bs-theme="dark"] .list-group-item {
    background-color: var(--dm-surface);
    border-color: var(--dm-border);
    color: var(--dm-text);
}

[data-bs-theme="dark"] .list-group-item-action:hover,
[data-bs-theme="dark"] .list-group-item-action:focus {
    background-color: var(--dm-surface-raised);
    color: var(--dm-text);
}

[data-bs-theme="dark"] .list-group-item .fw-bold {
    color: var(--dm-text);
}

/* ── Card bg-white headers (dashboard) ── */

[data-bs-theme="dark"] .card-header.bg-white {
    background-color: var(--dm-surface-raised) !important;
}

[data-bs-theme="dark"] .card-footer.bg-light {
    background-color: var(--dm-surface-raised) !important;
}

/* ── Notification items ───────────────── */

[data-bs-theme="dark"] .notification-item .border-bottom {
    border-color: var(--dm-border) !important;
}

[data-bs-theme="dark"] .notification-item p,
[data-bs-theme="dark"] .notification-item .small {
    color: var(--dm-text-secondary);
}

/* ── Metric cards ─────────────────────── */

[data-bs-theme="dark"] .metric-card .card-body {
    color: var(--dm-text);
}

[data-bs-theme="dark"] .metric-card .text-muted {
    color: var(--dm-text-muted) !important;
}

/* ── Outline button visibility ────────── */

[data-bs-theme="dark"] .btn-outline-primary {
    color: var(--brand-blue-text);
    border-color: var(--brand-blue);
}

[data-bs-theme="dark"] .btn-outline-secondary {
    color: var(--dm-text-secondary);
    border-color: var(--dm-border);
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: var(--dm-surface-raised);
    color: var(--dm-text);
    border-color: var(--dm-text-secondary);
}

/* btn-outline-dark: black-on-dark is invisible. Keep the higher emphasis vs
   btn-outline-secondary by using full --dm-text rather than --dm-text-secondary. */
[data-bs-theme="dark"] .btn-outline-dark {
    color: var(--dm-text);
    border-color: var(--dm-text);
}

[data-bs-theme="dark"] .btn-outline-dark:hover {
    background-color: var(--dm-text);
    color: var(--dm-bg);
    border-color: var(--dm-text);
}

/* btn-light: blinding white in dark mode */
[data-bs-theme="dark"] .btn-light {
    background-color: var(--dm-surface-raised);
    border-color: var(--dm-border);
    color: var(--dm-text);
}

[data-bs-theme="dark"] .btn-light:hover {
    background-color: #2e3440;
    border-color: #3a4250;
    color: #fff;
}

/* btn-info: neon cyan -> muted teal */
[data-bs-theme="dark"] .btn-info {
    background-color: #1a7a74;
    border-color: #156661;
    color: #e0e3e8;
}

[data-bs-theme="dark"] .btn-info:hover {
    background-color: #208f88;
    border-color: #1a7a74;
    color: #fff;
}

/* btn-warning: bright amber -> muted gold */
[data-bs-theme="dark"] .btn-warning {
    background-color: #8a6d1b;
    border-color: #735b16;
    color: #e0e3e8;
}

[data-bs-theme="dark"] .btn-warning:hover {
    background-color: #9f7e20;
    border-color: #8a6d1b;
    color: #fff;
}

/* btn-danger: keep recognizable but soften */
[data-bs-theme="dark"] .btn-danger {
    background-color: #8b2d37;
    border-color: #74252e;
    color: #e0e3e8;
}

[data-bs-theme="dark"] .btn-danger:hover {
    background-color: #a33540;
    border-color: #8b2d37;
    color: #fff;
}

/* btn-success: tone down the green */
[data-bs-theme="dark"] .btn-success {
    background-color: #1a6b3e;
    border-color: #155a33;
    color: #e0e3e8;
}

[data-bs-theme="dark"] .btn-success:hover {
    background-color: #1f7d48;
    border-color: #1a6b3e;
    color: #fff;
}

/* ── Inline <style> block overrides ────
   Some pages embed <style> blocks with light-mode colors.
   These need !important to override. */

[data-bs-theme="dark"] .metric-box {
    background-color: var(--dm-surface-raised) !important;
}

[data-bs-theme="dark"] .metric-label {
    color: var(--dm-text-secondary) !important;
}

[data-bs-theme="dark"] .metric-value {
    color: var(--dm-text) !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: var(--dm-text-secondary) !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    color: var(--brand-blue-text) !important;
    background-color: var(--dm-surface) !important;
    border-color: var(--dm-border) var(--dm-border) var(--dm-surface) !important;
}

[data-bs-theme="dark"] .nav-tabs {
    border-bottom-color: var(--dm-border) !important;
}

/* ── Catch-all: inline hardcoded brand colors ─
   Attribute selectors override inline styles
   that weren't converted to CSS variables yet. */

/* Inline color: #238DC1 (brand blue text) */
[data-bs-theme="dark"] [style*="color: #238DC1"]:not([style*="background-color: #238DC1"]),
[data-bs-theme="dark"] [style*="color:#238DC1"]:not([style*="background-color:#238DC1"]) {
    color: var(--brand-blue-text) !important;
}

/* Inline color: #00AEAA (brand teal text) */
[data-bs-theme="dark"] [style*="color: #00AEAA"]:not([style*="background-color: #00AEAA"]),
[data-bs-theme="dark"] [style*="color:#00AEAA"]:not([style*="background-color:#00AEAA"]) {
    color: var(--brand-teal) !important;
}

/* Inline color: #c0392b (brand red text)
   Use :not() to exclude elements where "color:" appears as part of "background-color:" */
[data-bs-theme="dark"] [style*="color: #c0392b"]:not([style*="background-color: #c0392b"]),
[data-bs-theme="dark"] [style*="color:#c0392b"]:not([style*="background-color:#c0392b"]) {
    color: #e05d52 !important;
}

/* Inline background-color: #238DC1 */
[data-bs-theme="dark"] [style*="background-color: #238DC1"],
[data-bs-theme="dark"] [style*="background-color:#238DC1"] {
    background-color: var(--brand-blue) !important;
}

/* Inline background-color: #00AEAA */
[data-bs-theme="dark"] [style*="background-color: #00AEAA"],
[data-bs-theme="dark"] [style*="background-color:#00AEAA"] {
    background-color: var(--brand-teal) !important;
}

/* Inline background-color: Bootstrap contextual */
[data-bs-theme="dark"] [style*="background-color: #ffc107"],
[data-bs-theme="dark"] [style*="background-color:#ffc107"] {
    background-color: #8a6d1b !important;
    color: #e0e3e8 !important;
}

[data-bs-theme="dark"] [style*="background-color: #28a745"],
[data-bs-theme="dark"] [style*="background-color:#28a745"] {
    background-color: #1a6b3e !important;
}

[data-bs-theme="dark"] [style*="background-color: #c0392b"],
[data-bs-theme="dark"] [style*="background-color:#c0392b"] {
    background-color: #a33540 !important;
}

[data-bs-theme="dark"] [style*="background-color: #dc3545"],
[data-bs-theme="dark"] [style*="background-color:#dc3545"] {
    background-color: #8b2d37 !important;
}

/* Inline background: white or #f8f9fa */
[data-bs-theme="dark"] [style*="background: white"],
[data-bs-theme="dark"] [style*="background-color: white"] {
    background: var(--dm-surface) !important;
}

[data-bs-theme="dark"] [style*="background-color: #f8f9fa"],
[data-bs-theme="dark"] [style*="background-color:#f8f9fa"] {
    background-color: var(--dm-surface-raised) !important;
}

/* Inline border-color: #D4E4F1 or #dee2e6 */
[data-bs-theme="dark"] [style*="border-top: 1px solid #D4E4F1"],
[data-bs-theme="dark"] [style*="border: 1px solid #dee2e6"],
[data-bs-theme="dark"] [style*="border: 1px solid #D4E4F1"] {
    border-color: var(--dm-border) !important;
}

/* Inline border-left with brand colors */
[data-bs-theme="dark"] [style*="border-left: 4px solid #238DC1"] {
    border-left-color: var(--brand-blue) !important;
}

[data-bs-theme="dark"] [style*="border-left: 4px solid #00AEAA"] {
    border-left-color: var(--brand-teal) !important;
}

[data-bs-theme="dark"] [style*="border-left: 4px solid #ffc107"] {
    border-left-color: #c9a227 !important;
}

[data-bs-theme="dark"] [style*="border-left: 4px solid #198754"] {
    border-left-color: #3daa6a !important;
}

[data-bs-theme="dark"] [style*="border-left: 4px solid #6f42c1"] {
    border-left-color: #9171d1 !important;
}

[data-bs-theme="dark"] [style*="border-top: 3px solid"] {
    border-image: none !important;
    border-top-color: var(--dm-border) !important;
}

/* Inline light backgrounds used as card/section fills */
[data-bs-theme="dark"] [style*="background-color: #e8f4fd"],
[data-bs-theme="dark"] [style*="background-color:#e8f4fd"] {
    background-color: rgba(36, 142, 194, 0.1) !important;
}

[data-bs-theme="dark"] [style*="background-color: #d1ecf1"],
[data-bs-theme="dark"] [style*="background-color:#d1ecf1"] {
    background-color: rgba(36, 142, 194, 0.1) !important;
}

[data-bs-theme="dark"] [style*="background-color: #f8d7da"],
[data-bs-theme="dark"] [style*="background-color:#f8d7da"] {
    background-color: rgba(220, 53, 69, 0.12) !important;
}

/* OTP/debug display color (#0066cc) */
[data-bs-theme="dark"] [style*="color: #0066cc"],
[data-bs-theme="dark"] [style*="color:#0066cc"] {
    color: var(--brand-blue-text) !important;
}

/* Signature text (#1a1a8a) — dark blue invisible on dark bg */
[data-bs-theme="dark"] [style*="color: #1a1a8a"],
[data-bs-theme="dark"] [style*="color:#1a1a8a"] {
    color: #8a9fe8 !important;
}

/* Dashboard amber (#f39c12) */
[data-bs-theme="dark"] [style*="color: #f39c12"],
[data-bs-theme="dark"] [style*="color:#f39c12"] {
    color: #c9a227 !important;
}

/* Chat/modal body light backgrounds */
[data-bs-theme="dark"] [style*="background: #f4f5f7"],
[data-bs-theme="dark"] [style*="background-color: #f4f5f7"],
[data-bs-theme="dark"] [style*="background:#f4f5f7"] {
    background: var(--dm-surface) !important;
    background-color: var(--dm-surface) !important;
}

/* Teal-tinted section backgrounds */
[data-bs-theme="dark"] [style*="background-color: #e8f8f7"],
[data-bs-theme="dark"] [style*="background-color: #f0faf9"] {
    background-color: rgba(62, 189, 183, 0.08) !important;
}

/* Blue-tinted section backgrounds */
[data-bs-theme="dark"] [style*="background-color: #eaf4fc"] {
    background-color: rgba(36, 142, 194, 0.08) !important;
}

/* Dark teal text (#1a6b67) */
[data-bs-theme="dark"] [style*="color: #1a6b67"],
[data-bs-theme="dark"] [style*="color:#1a6b67"] {
    color: #7ec7c3 !important;
}

/* Dark blue text (#1a5f8a) */
[data-bs-theme="dark"] [style*="color: #1a5f8a"],
[data-bs-theme="dark"] [style*="color:#1a5f8a"] {
    color: #7eb3d4 !important;
}

/* Purple stat text (#6f42c1) */
[data-bs-theme="dark"] [style*="color: #6f42c1"],
[data-bs-theme="dark"] [style*="color:#6f42c1"] {
    color: #9171d1 !important;
}

/* Gray label text (#666, #6c757d) that goes invisible */
[data-bs-theme="dark"] [style*="color: #666"],
[data-bs-theme="dark"] [style*="color:#666"] {
    color: var(--dm-text-muted) !important;
}

[data-bs-theme="dark"] [style*="color: #6c757d"],
[data-bs-theme="dark"] [style*="color:#6c757d"] {
    color: var(--dm-text-secondary) !important;
}

/* ── Catch-all: Bootstrap class combos ───
   Fix common patterns like bg-white on cards,
   bg-warning + text-dark badges, border-0 cards */

/* bg-white on action bars, table containers, code blocks */
[data-bs-theme="dark"] .action-bar-sticky.bg-white,
[data-bs-theme="dark"] table.bg-white,
[data-bs-theme="dark"] pre.bg-white {
    background-color: var(--dm-surface) !important;
}

/* border-0 cards: restore border in dark mode for separation */
[data-bs-theme="dark"] .card.border-0 {
    border: 1px solid var(--dm-border) !important;
}

/* bg-warning text-dark badges: keep text visible */
[data-bs-theme="dark"] .bg-warning.text-dark {
    color: #fff !important;
    background-color: #b87800 !important;
}

/* bg-light text-dark badges: make visible */
[data-bs-theme="dark"] .badge.bg-light.text-dark {
    background-color: var(--dm-surface-raised) !important;
    color: var(--dm-text) !important;
    border: 1px solid var(--dm-border);
}

/* bg-white on misc containers */
[data-bs-theme="dark"] .card-footer.bg-white {
    background-color: var(--dm-surface) !important;
}

/* ── Activity timeline ────────────────── */

.activity-timeline {
    position: relative;
    padding-left: 28px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: #dee2e6;
}

.timeline-entry {
    position: relative;
    display: flex;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
}

.timeline-entry:last-child {
    padding-bottom: 0;
}

.timeline-icon-wrapper {
    position: absolute;
    left: -28px;
    top: 1px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #6c757d;
    z-index: 1;
}

.timeline-status .timeline-icon-wrapper {
    border-color: var(--brand-blue, #238DC1);
    color: var(--brand-blue, #238DC1);
}

.timeline-interview .timeline-icon-wrapper {
    border-color: var(--brand-teal, #00AEAA);
    color: var(--brand-teal, #00AEAA);
}

.timeline-document .timeline-icon-wrapper {
    border-color: #6f42c1;
    color: #6f42c1;
}

.timeline-warning .timeline-icon-wrapper {
    border-color: #c0392b;
    color: #c0392b;
}

.timeline-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: #495057;
    line-height: 1.3;
}

.timeline-meta {
    font-size: 0.7rem;
    color: #adb5bd;
}

/* ── Activity timeline: dark mode ──── */

[data-bs-theme="dark"] .activity-timeline::before {
    background: var(--dm-border);
}

[data-bs-theme="dark"] .timeline-icon-wrapper {
    background: var(--dm-surface);
    border-color: var(--dm-border);
    color: var(--dm-text-muted);
}

[data-bs-theme="dark"] .timeline-status .timeline-icon-wrapper {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

[data-bs-theme="dark"] .timeline-interview .timeline-icon-wrapper {
    border-color: var(--brand-teal);
    color: var(--brand-teal);
}

[data-bs-theme="dark"] .timeline-document .timeline-icon-wrapper {
    border-color: #9171d1;
    color: #9171d1;
}

[data-bs-theme="dark"] .timeline-warning .timeline-icon-wrapper {
    border-color: #c75a5a;
    color: #c75a5a;
}

[data-bs-theme="dark"] .timeline-title {
    color: var(--dm-text);
}

[data-bs-theme="dark"] .timeline-meta {
    color: var(--dm-text-muted);
}

/* ── Quick nav (Ctrl+K) ──────────────── */

.quick-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 41, 73, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: min(20vh, 120px);
}

.quick-nav-modal {
    width: min(90vw, 540px);
    background: #0F1F2D;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    color: #EAF2F8;
    animation: quickNavIn 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes quickNavIn {
    from { opacity: 0; transform: scale(0.96) translateY(-8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.quick-nav-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.quick-nav-search i {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1rem;
    flex-shrink: 0;
}

.quick-nav-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.95rem;
    background: transparent;
    color: #EAF2F8;
}

.quick-nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.quick-nav-search kbd,
.quick-nav-footer kbd {
    font: 600 10px var(--font-mono);
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.quick-nav-results {
    max-height: min(50vh, 360px);
    overflow-y: auto;
    padding: 6px;
}

.quick-nav-empty {
    padding: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.875rem;
}

.quick-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background 120ms cubic-bezier(0.2, 0.8, 0.2, 1), color 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
    color: rgba(234, 242, 248, 0.85);
}

.quick-nav-item:hover,
.quick-nav-item.selected {
    background: rgba(35, 141, 193, 0.18);
    color: #ffffff;
}

.quick-nav-item i {
    color: #5DB3DE;
    font-size: 0.95rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.quick-nav-label {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.quick-nav-section {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.quick-nav-footer {
    display: flex;
    gap: 1rem;
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    align-items: center;
}

.quick-nav-footer span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── Dropdown: no-caret variant ───────── */

.dropdown-toggle-no-caret::after {
    display: none !important;
}

/* ── Pipeline progress bar ────────────── */

.pipeline-progress {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.step-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid #dee2e6;
    background: #fff;
    color: #dee2e6;
    transition: all 0.2s ease;
}

.step-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.step-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #adb5bd;
    margin-top: 4px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: #dee2e6;
    min-width: 12px;
    transition: background 0.2s ease;
}

/* Completed step */
.step-complete .step-indicator {
    background: var(--brand-blue, #238DC1);
    border-color: var(--brand-blue, #238DC1);
    color: #fff;
}

.step-complete .step-label {
    color: var(--brand-blue, #238DC1);
}

.connector-complete {
    background: var(--brand-blue, #238DC1);
}

/* Current step */
.step-current .step-indicator {
    border-color: var(--brand-blue, #238DC1);
    background: #fff;
    color: var(--brand-blue, #238DC1);
    box-shadow: 0 0 0 3px rgba(36, 142, 194, 0.15);
}

.step-current .step-label {
    color: var(--brand-blue, #238DC1);
    font-weight: 700;
}

/* Terminal step (rejected/withdrawn) */
.step-terminal .step-indicator {
    border-color: #c0392b;
    background: #c0392b;
    color: #fff;
    font-size: 0.65rem;
}

.step-terminal .step-label {
    color: #c0392b;
    font-weight: 700;
}

.pipeline-terminal .step-pending .step-indicator {
    opacity: 0.35;
}

.pipeline-terminal .step-pending .step-label {
    opacity: 0.35;
}

/* Compact mode (no labels, smaller indicators) */
.pipeline-compact .step-indicator {
    width: 18px;
    height: 18px;
    font-size: 0.55rem;
}

.pipeline-compact .step-dot {
    width: 4px;
    height: 4px;
}

.pipeline-compact .step-connector {
    min-width: 8px;
}

.pipeline-compact .step-terminal .step-indicator {
    font-size: 0.5rem;
}

/* Hired: final step gets green */
.pipeline-step.step-current:last-of-type .step-indicator,
.pipeline-step.step-complete:last-of-type .step-indicator {
    border-color: #198754;
    background: #198754;
    color: #fff;
}

.pipeline-step.step-current:last-of-type .step-label,
.pipeline-step.step-complete:last-of-type .step-label {
    color: #198754;
}

/* ── Pipeline: dark mode ─────────────── */

[data-bs-theme="dark"] .step-indicator {
    border-color: var(--dm-border);
    background: var(--dm-surface);
    color: var(--dm-border);
}

[data-bs-theme="dark"] .step-connector {
    background: var(--dm-border);
}

[data-bs-theme="dark"] .step-label {
    color: var(--dm-text-muted);
}

[data-bs-theme="dark"] .step-current .step-indicator {
    border-color: var(--brand-blue);
    background: var(--dm-surface);
    color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(36, 142, 194, 0.2);
}

[data-bs-theme="dark"] .step-terminal .step-indicator {
    border-color: #a33540;
    background: #a33540;
}

[data-bs-theme="dark"] .step-terminal .step-label {
    color: #c75a5a;
}

[data-bs-theme="dark"] .pipeline-step.step-current:last-of-type .step-indicator,
[data-bs-theme="dark"] .pipeline-step.step-complete:last-of-type .step-indicator {
    border-color: #1a6b3e;
    background: #1a6b3e;
}

[data-bs-theme="dark"] .pipeline-step.step-current:last-of-type .step-label,
[data-bs-theme="dark"] .pipeline-step.step-complete:last-of-type .step-label {
    color: #3daa6a;
}

/* ── Pipeline: interactive mode ─────────── */

.pipeline-interactive .pipeline-step {
    cursor: pointer;
    border-radius: 8px;
    padding: 4px;
    margin: -4px;
    transition: background-color 0.15s ease, transform 0.15s ease;
    outline: none;
}

.pipeline-interactive .pipeline-step:hover .step-indicator,
.pipeline-interactive .pipeline-step:focus-visible .step-indicator {
    transform: scale(1.15);
}

.pipeline-interactive .pipeline-step:hover {
    background-color: rgba(36, 142, 194, 0.08);
}

.pipeline-interactive .pipeline-step:focus-visible {
    background-color: rgba(36, 142, 194, 0.12);
    box-shadow: 0 0 0 2px rgba(36, 142, 194, 0.4);
}

[data-bs-theme="dark"] .pipeline-interactive .pipeline-step:hover {
    background-color: rgba(62, 189, 183, 0.12);
}

[data-bs-theme="dark"] .pipeline-interactive .pipeline-step:focus-visible {
    background-color: rgba(62, 189, 183, 0.18);
    box-shadow: 0 0 0 2px rgba(62, 189, 183, 0.5);
}

/* ── Pipeline breakout popover ──────────
 * Rendered at layout level by PipelineBreakoutHost — it lives outside any
 * card subtree, so overflow:hidden and hover transforms on cards don't
 * clip or trap it. Anchored to the clicked dot via fixed positioning.
 */

.pipeline-breakout-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1065;
    background: transparent;
    cursor: default;
}

.pipeline-breakout-popover {
    --popover-accent: var(--brand-blue, #238DC1);
    --popover-arrow-offset: 50%;

    position: fixed;
    z-index: 1070;
    width: 340px;
    max-width: calc(100vw - 24px);
    /* max-height is set inline per placement so the popover sizes to content
       and only scrolls when content genuinely can't fit in the chosen direction. */
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 4px 8px rgba(0, 0, 0, 0.06);
    overflow-y: auto;
    animation: pipelinePopoverIn 0.15s ease-out;
}

/* Centered fallback (keyboard trigger): use generic max-height since we have no
   anchor reference point. */
.pipeline-breakout-popover.is-centered {
    max-height: calc(100vh - 24px);
}

.pipeline-breakout-popover.is-centered {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
}

.pipeline-breakout-popover.is-centered .popover-arrow {
    display: none;
}

@keyframes pipelinePopoverIn {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Arrow pointing up at the clicked dot (default placement: popover below click) */
.pipeline-breakout-popover .popover-arrow {
    position: absolute;
    top: -7px;
    left: var(--popover-arrow-offset);
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    rotate: 45deg;
    z-index: 0;
}

/* Flipped variant: popover is above the click, arrow points down */
.pipeline-breakout-popover.arrow-bottom .popover-arrow {
    top: auto;
    bottom: -7px;
    border-top: none;
    border-left: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .pipeline-breakout-popover.arrow-bottom .popover-arrow {
    border-bottom-color: var(--dm-border);
    border-right-color: var(--dm-border);
}

/* Header */
.pipeline-breakout-popover .popover-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0));
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.pipeline-breakout-popover .popover-header-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--popover-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.pipeline-breakout-popover .popover-header-text {
    flex: 1;
    min-width: 0;
}

.pipeline-breakout-popover .popover-title {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.25;
}

.pipeline-breakout-popover .popover-state-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 4px;
}

.badge-current {
    background: rgba(36, 142, 194, 0.12);
    color: var(--brand-blue, #238DC1);
}

.badge-completed {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}

.badge-upcoming {
    background: rgba(108, 117, 125, 0.14);
    color: #6c757d;
}

.badge-skipped {
    background: rgba(108, 117, 125, 0.08);
    color: #adb5bd;
    border: 1px dashed rgba(108, 117, 125, 0.35);
}

.badge-terminal {
    background: rgba(192, 57, 43, 0.12);
    color: #c0392b;
}

.pipeline-breakout-popover .popover-close {
    flex-shrink: 0;
    background: transparent;
    border: 0;
    color: #6c757d;
    font-size: 0.9rem;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pipeline-breakout-popover .popover-close:hover,
.pipeline-breakout-popover .popover-close:focus-visible {
    background: rgba(0, 0, 0, 0.06);
    color: #212529;
    outline: none;
}

/* Body */
.pipeline-breakout-popover .popover-body {
    padding: 12px 14px 14px;
}

.pipeline-breakout-popover .popover-section + .popover-section {
    margin-top: 10px;
}

.pipeline-breakout-popover .popover-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 2px;
}

.pipeline-breakout-popover .popover-text {
    font-size: 0.9rem;
    line-height: 1.45;
    color: #343a40;
    margin: 0;
}

.pipeline-breakout-popover .popover-time {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

/* State accent colors drive the header icon */
.pipeline-breakout-popover.state-current { --popover-accent: var(--brand-blue, #238DC1); }
.pipeline-breakout-popover.state-completed { --popover-accent: #198754; }
.pipeline-breakout-popover.state-upcoming { --popover-accent: #6c757d; }
.pipeline-breakout-popover.state-skipped { --popover-accent: #adb5bd; }
.pipeline-breakout-popover.state-terminal { --popover-accent: #c0392b; }

/* Dark mode */
[data-bs-theme="dark"] .pipeline-breakout-popover {
    background: var(--dm-surface);
    border-color: var(--dm-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 4px 8px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .popover-arrow {
    background: var(--dm-surface);
    border-top-color: var(--dm-border);
    border-left-color: var(--dm-border);
}

[data-bs-theme="dark"] .popover-header {
    border-bottom-color: var(--dm-border);
}

[data-bs-theme="dark"] .popover-title {
    color: var(--dm-text);
}

[data-bs-theme="dark"] .popover-label {
    color: var(--dm-text-muted);
}

[data-bs-theme="dark"] .popover-text {
    color: var(--dm-text);
}

[data-bs-theme="dark"] .popover-time {
    color: var(--dm-text-muted);
    border-top-color: var(--dm-border);
}

[data-bs-theme="dark"] .popover-close {
    color: var(--dm-text-muted);
}

[data-bs-theme="dark"] .popover-close:hover,
[data-bs-theme="dark"] .popover-close:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: var(--dm-text);
}

/* ── Missed-contact dashboard alerts ── */

.missed-contact-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.missed-contact-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(62, 189, 183, 0.08), rgba(62, 189, 183, 0.02));
    border: 1px solid rgba(62, 189, 183, 0.4);
    border-left: 4px solid #00AEAA;
    border-radius: 10px;
    position: relative;
}

.missed-contact-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #00AEAA;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.missed-contact-body {
    flex: 1;
    min-width: 0;
}

.missed-contact-headline {
    font-size: 1rem;
    color: #212529;
    line-height: 1.35;
}

.missed-contact-reqnum {
    color: #6c757d;
    font-size: 0.85rem;
    margin-left: 6px;
}

.missed-contact-meta {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 2px;
}

.missed-contact-snippet {
    font-size: 0.85rem;
    color: #495057;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 6px;
    padding: 6px 10px;
    margin-top: 8px;
    font-style: italic;
}

.missed-contact-actions {
    margin-top: 10px;
}

.missed-contact-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: 0;
    color: #6c757d;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.missed-contact-close:hover,
.missed-contact-close:focus-visible {
    background: rgba(0, 0, 0, 0.06);
    color: #212529;
    outline: none;
}

[data-bs-theme="dark"] .missed-contact-card {
    background: linear-gradient(180deg, rgba(62, 189, 183, 0.12), rgba(62, 189, 183, 0.04));
    border-color: rgba(62, 189, 183, 0.35);
}

[data-bs-theme="dark"] .missed-contact-headline {
    color: var(--dm-text);
}

[data-bs-theme="dark"] .missed-contact-meta,
[data-bs-theme="dark"] .missed-contact-reqnum {
    color: var(--dm-text-muted);
}

[data-bs-theme="dark"] .missed-contact-snippet {
    background: rgba(255, 255, 255, 0.05);
    color: var(--dm-text);
}

[data-bs-theme="dark"] .missed-contact-close {
    color: var(--dm-text-muted);
}

[data-bs-theme="dark"] .missed-contact-close:hover,
[data-bs-theme="dark"] .missed-contact-close:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: var(--dm-text);
}

/* ── AVI record-interview mobile stepper ── */

.avi-stepper-mobile-bar {
    height: 6px;
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.avi-stepper-mobile-bar .progress-bar {
    background-color: var(--brand-blue, #238DC1);
    transition: width 0.25s ease-out;
}

[data-bs-theme="dark"] .avi-stepper-mobile-bar {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ── AVI intro-screen mobile flow summary ── */

.avi-intro-flow {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #6c757d;
}

.avi-intro-flow .avi-intro-flow-active {
    background-color: #00AEAA;
    color: #fff;
    font-weight: 600;
}

[data-bs-theme="dark"] .avi-intro-flow {
    color: var(--dm-text-muted);
}

/* ── AVI assessment overview ─────────── */

.avi-total-tile {
    background: linear-gradient(135deg, rgba(36, 142, 194, 0.04), rgba(36, 142, 194, 0.01));
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--score-color, #238DC1);
    border-radius: 10px;
    padding: 14px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.avi-total-label,
.avi-meta-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
    margin-bottom: 4px;
}

.avi-total-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--score-color, #238DC1);
}

.avi-total-max {
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    margin-left: 2px;
}

.avi-total-band {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--score-color, #238DC1);
    margin-top: 2px;
}

.avi-meta-tile {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    padding: 14px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.avi-confidence-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #212529;
    line-height: 1;
}

.avi-confidence-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.06);
}

.avi-competency-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
    margin-bottom: 8px;
}

/* Competency tile — uses <details> for native expand/collapse, no JS */
.avi-competency-tile {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 3px solid var(--score-color, #6c757d);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.avi-competency-tile:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.avi-competency-tile[open] {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.avi-competency-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.avi-competency-summary::-webkit-details-marker {
    display: none;
}

.avi-competency-score {
    flex-shrink: 0;
    min-width: 42px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--score-color, #6c757d);
    line-height: 1;
}

.avi-competency-max {
    font-size: 0.75rem;
    font-weight: 600;
    color: #adb5bd;
    margin-left: 1px;
}

.avi-competency-body {
    flex: 1;
    min-width: 0;
}

.avi-competency-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.avi-competency-evidence-preview {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 2px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.avi-competency-chevron {
    flex-shrink: 0;
    color: #adb5bd;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.avi-competency-tile[open] .avi-competency-chevron {
    transform: rotate(180deg);
}

.avi-competency-full {
    padding: 0 12px 12px 64px;
    font-size: 0.85rem;
    color: #343a40;
    line-height: 1.45;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    padding-top: 10px;
    margin-top: 2px;
}

/* Dark mode */
[data-bs-theme="dark"] .avi-total-tile,
[data-bs-theme="dark"] .avi-meta-tile,
[data-bs-theme="dark"] .avi-competency-tile {
    background: var(--dm-surface);
    border-color: var(--dm-border);
}

[data-bs-theme="dark"] .avi-total-label,
[data-bs-theme="dark"] .avi-meta-label,
[data-bs-theme="dark"] .avi-competency-label,
[data-bs-theme="dark"] .avi-total-max {
    color: var(--dm-text-muted);
}

[data-bs-theme="dark"] .avi-confidence-value,
[data-bs-theme="dark"] .avi-competency-name {
    color: var(--dm-text);
}

[data-bs-theme="dark"] .avi-competency-evidence-preview {
    color: var(--dm-text-muted);
}

[data-bs-theme="dark"] .avi-competency-full {
    color: var(--dm-text);
    border-top-color: var(--dm-border);
}

/* ── Reusable section-highlight cards ── */

.section-highlight-teal .card-header {
    background-color: #e8f8f7;
}

.section-highlight-teal .card-title {
    color: #1a6b67;
}

.section-highlight-blue .card-header {
    background-color: #eaf4fc;
}

.section-highlight-blue .card-title {
    color: #1a5f8a;
}

[data-bs-theme="dark"] .section-highlight-teal .card-header {
    background-color: rgba(62, 189, 183, 0.08) !important;
}

[data-bs-theme="dark"] .section-highlight-teal .card-title {
    color: #7ec7c3 !important;
}

[data-bs-theme="dark"] .section-highlight-blue .card-header {
    background-color: rgba(36, 142, 194, 0.08) !important;
}

[data-bs-theme="dark"] .section-highlight-blue .card-title {
    color: #7eb3d4 !important;
}

/* ── Signature text ──────────────────── */

.signature-text {
    color: #1a1a8a;
}

[data-bs-theme="dark"] .signature-text {
    color: #8a9fe8 !important;
}

/* ── Chat/discussion modal body ──────── */

.chat-body {
    background: #f4f5f7;
}

[data-bs-theme="dark"] .chat-body {
    background: var(--dm-surface) !important;
}

/* ── Loading overlay ─────────────────── */

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-bs-theme="dark"] .loading-overlay {
    background: rgba(18, 20, 23, 0.95) !important;
}

/* ── Stat color: amber/pending ───────── */

.stat-amber {
    color: #f39c12;
}

[data-bs-theme="dark"] .stat-amber {
    color: #c9a227 !important;
}

/* ── Unchecked checkbox icon ─────────── */

.icon-unchecked {
    color: #999;
    font-size: 1.1rem;
}

[data-bs-theme="dark"] .icon-unchecked {
    color: var(--dm-text-muted) !important;
}

/* ── Signature field overlay (PDF) ───── */

.signature-field-highlight {
    border: 2px dashed var(--brand-blue);
    background: rgba(36, 142, 194, 0.1);
}

.signature-field-label {
    background: var(--brand-blue);
    color: white;
}

/* ── Job description editor ──────────── */

[data-bs-theme="dark"] .job-description-editor {
    background-color: var(--dm-surface) !important;
    border-color: var(--dm-border) !important;
}

[data-bs-theme="dark"] .formatting-toolbar {
    background-color: var(--dm-surface-raised) !important;
    border-color: var(--dm-border) !important;
}

[data-bs-theme="dark"] .editor-textarea {
    background-color: var(--dm-bg) !important;
    color: var(--dm-text) !important;
    border-color: var(--dm-border) !important;
}

[data-bs-theme="dark"] .preview-box {
    background-color: var(--dm-surface-raised) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-text);
}

[data-bs-theme="dark"] .ai-assist-section {
    background-color: var(--dm-surface-raised) !important;
    border-color: var(--dm-border) !important;
}

[data-bs-theme="dark"] .ai-status {
    background-color: var(--dm-surface) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-text-secondary);
}

/* ── Theme toggle button ──────────────── */

.theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.theme-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.theme-toggle i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(15deg);
}

/* ─── Staffing Specialist Assistant Chat Panel ─── */
.agent-chat-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    font-size: 0.875rem;
    border-radius: 12px;
    box-shadow: var(--shadow-4);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    transition: width 0.2s var(--ease-out), border-radius 0.2s var(--ease-out);
}

.agent-chat-panel.collapsed {
    width: auto;
    border-radius: 999px;
    box-shadow: var(--shadow-3);
}

.agent-chat-panel.open {
    width: 420px;
    display: flex;
    flex-direction: column;
}

.agent-chat-panel.expanded {
    width: 640px;
}

.agent-chat-panel.expanded .chat-messages {
    height: 520px;
}

.chat-header {
    background: var(--brand-blue);
    color: #fff;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.collapsed .chat-header {
    border-radius: 999px;
    padding: 8px 18px;
}

.open .chat-header {
    border-radius: 12px 12px 0 0;
}

.chat-header-title {
    flex: 1;
}

.chat-header-btn {
    background: transparent;
    border: none;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.8;
}

.chat-header-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    height: 360px;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-welcome {
    color: #6c757d;
    font-size: 0.85rem;
    padding: 8px;
}

.chat-welcome ul {
    margin: 4px 0 0;
    padding-left: 18px;
}

.chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chat-chip {
    background: var(--bg-surface);
    color: var(--brand-blue-dark);
    border: 1.5px solid var(--brand-blue);
    border-radius: 999px;
    padding: 4px 12px;
    font: 600 11.5px var(--font-display);
    cursor: pointer;
    transition: background 120ms var(--ease-out), color 120ms var(--ease-out);
}

.chat-chip:hover { background: var(--accent-primary-soft); }

.chat-slow-msg {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

[data-bs-theme="dark"] .chat-chip {
    background: #1a3a4a;
    color: #6cc0e8;
    border-color: #2a5a6a;
}

[data-bs-theme="dark"] .chat-chip:hover { background: #244a5a; }

[data-bs-theme="dark"] .chat-slow-msg { color: #999; }

.chat-unavailable {
    text-align: center;
    padding: 24px 16px;
    color: #856404;
}

.chat-unavailable i { font-size: 1.5rem; }
.chat-unavailable p { margin: 6px 0; font-size: 0.85rem; }

.chat-message {
    max-width: 88%;
    padding: 8px 12px;
    border-radius: 10px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.user {
    align-self: flex-end;
    background: #238DC1;
    color: #fff;
    border-bottom-right-radius: 3px;
}

.chat-message.assistant {
    align-self: flex-start;
    background: #f0f2f5;
    color: #212529;
    border-bottom-left-radius: 3px;
}

.chat-message-content {
    font-size: 0.85rem;
}

/* Markdown inside chat bubbles */
.chat-message-content p { margin: 0 0 6px; }
.chat-message-content p:last-child { margin-bottom: 0; }
.chat-message-content ul, .chat-message-content ol { margin: 4px 0; padding-left: 20px; }
.chat-message-content li { margin: 2px 0; }
.chat-message-content h1, .chat-message-content h2, .chat-message-content h3 { font-size: 0.95rem; font-weight: 600; margin: 6px 0 4px; }
.chat-message-content code { background: rgba(0,0,0,0.08); padding: 1px 4px; border-radius: 3px; font-size: 0.8rem; }
.chat-message-content pre { background: rgba(0,0,0,0.06); padding: 8px; border-radius: 6px; overflow-x: auto; margin: 6px 0; }
.chat-message-content pre code { background: none; padding: 0; }
.chat-message-content strong { font-weight: 600; }
.chat-message-content table { border-collapse: collapse; width: 100%; margin: 6px 0; font-size: 0.8rem; }
.chat-message-content th, .chat-message-content td { border: 1px solid rgba(0,0,0,0.15); padding: 4px 8px; text-align: left; }
.chat-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 5px 12px;
    background: #238DC1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
}

.chat-nav-btn:hover { background: #1d7aab; }

.chat-message-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.chat-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: transparent;
    color: #238DC1;
    border: 1px solid #238DC1;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.chat-action-btn:hover:not(:disabled) { background: rgba(36,142,194,0.08); }

.chat-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.chat-action-btn-primary {
    background: #238DC1;
    color: #fff;
    border-color: #238DC1;
}

.chat-action-btn-primary:hover:not(:disabled) { background: #1d7aab; border-color: #1d7aab; }

[data-bs-theme="dark"] .chat-action-btn {
    color: #5ab1dc;
    border-color: #5ab1dc;
}

[data-bs-theme="dark"] .chat-action-btn:hover:not(:disabled) { background: rgba(90,177,220,0.15); }

[data-bs-theme="dark"] .chat-action-btn-primary {
    background: #5ab1dc;
    color: #0f1b22;
    border-color: #5ab1dc;
}

[data-bs-theme="dark"] .chat-action-btn-primary:hover:not(:disabled) { background: #7dc2e3; border-color: #7dc2e3; }

.chat-message.user .chat-message-content code { background: rgba(255,255,255,0.2); }
.chat-message.user .chat-message-content pre { background: rgba(255,255,255,0.12); }

[data-bs-theme="dark"] .chat-message-content code { background: rgba(255,255,255,0.1); }
[data-bs-theme="dark"] .chat-message-content pre { background: rgba(255,255,255,0.06); }
[data-bs-theme="dark"] .chat-message-content th,
[data-bs-theme="dark"] .chat-message-content td { border-color: rgba(255,255,255,0.15); }

.chat-input {
    display: flex;
    padding: 8px;
    border-top: 1px solid #dee2e6;
    gap: 6px;
}

.chat-input input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    outline: none;
    background: #fff;
    color: #212529;
}

.chat-input input:focus {
    border-color: #238DC1;
    box-shadow: 0 0 0 2px rgba(36, 142, 194, 0.15);
}

.chat-input button {
    background: var(--brand-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 120ms var(--ease-out);
    flex-shrink: 0;
}

.chat-input button:hover:not(:disabled) {
    background: var(--brand-blue-dark);
}

.chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dark mode */
[data-bs-theme="dark"] .agent-chat-panel {
    background: #1e1e1e;
    border-color: #444;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .chat-message.assistant {
    background: #2d2d2d;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .chat-welcome {
    color: #aaa;
}

[data-bs-theme="dark"] .chat-input {
    border-top-color: #444;
}

[data-bs-theme="dark"] .chat-input input {
    background: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

/* ================================================================
   RESPONSIVE TABLE COLUMN PRIORITIES

   Mark each <th> AND every <td> in a column with one priority class.
   Higher number = lower priority — hides first as the viewport shrinks.
   Add `table-show-all` to the parent <table> to override and show every column.

   Priority   Hides below   Typical user impact
   --------   -----------   --------------
   pri-1      never         Always visible (the row's anchor: name, title, status, primary action)
   pri-2      576px         Hides on phone
   pri-3      768px         Hides on small tablet / phablet
   pri-4      1200px        Hides on small laptop and below — only desktop sees these
   pri-5      1920px        Hides on 1080p desktop with sidebar+padding — only 1440p+ users see these
   pri-6      2560px        Hides on 1440p — only 4k+ users see these (developer-only by default)

   The 1920 and 2560 breakpoints are above Bootstrap's xxl (1400px) by design:
   real-world content width on a 1080p monitor with the app's sidebar is ~1600px,
   which is plenty for 6-8 columns but starts squishing past that. Anything tagged
   pri-5 should hide there. pri-6 catches the long tail of "data only the 4k dev
   ever sees comfortably."
   ================================================================ */

@media (max-width: 575.98px)  { .col-pri-2 { display: none; } }
@media (max-width: 767.98px)  { .col-pri-3 { display: none; } }
@media (max-width: 1199.98px) { .col-pri-4 { display: none; } }
@media (max-width: 1919.98px) { .col-pri-5 { display: none; } }
@media (max-width: 2559.98px) { .col-pri-6 { display: none; } }

/* Override: add class="table-show-all" on the <table> to show every priority column */
.table-show-all .col-pri-2,
.table-show-all .col-pri-3,
.table-show-all .col-pri-4,
.table-show-all .col-pri-5,
.table-show-all .col-pri-6 {
    display: table-cell !important;
}

[data-bs-theme="dark"] .chat-input input:focus {
    border-color: #238DC1;
    box-shadow: 0 0 0 2px rgba(36, 142, 194, 0.25);
}

.op-page-header { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 16px 24px; margin-bottom: 28px; }
.op-page-header .titleblock { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.op-page-header .title { font: 700 28px/1.2 var(--font-display); letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; color: var(--fg-primary); margin: 0; }
.op-page-header .title .ico { color: var(--fg-secondary); display: inline-flex; align-items: center; font-size: 22px; }
.op-page-header .subtitle { font: 400 14px var(--font-body); color: var(--fg-tertiary); margin: 0; }
.op-page-header .accent { display: block; width: 160px; height: 3px; background: var(--gradient-brand-horizontal); border-radius: 999px; margin-top: 6px; }
.op-page-header .actions { display: flex; gap: 10px; align-self: start; flex-wrap: wrap; }

@media (max-width: 640px) {
    .op-page-header { grid-template-columns: 1fr; }
    .op-page-header .title { font-size: 24px; }
    .op-page-header .actions { width: 100%; }
}

.op-pill { font: 600 11.5px/1 var(--font-display); padding: 5px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; color: #fff; white-space: nowrap; }
.op-pill--blue { background: var(--brand-blue); }
.op-pill--teal { background: var(--brand-teal); }
.op-pill--green { background: #1F8A5B; }
.op-pill--grey { background: #6B7886; }
.op-pill--red { background: var(--brand-red); }
.op-pill--amber { background: #C58A1A; }
.op-pill i { font-size: 11px; }

.op-pill-outline { font: 600 11.5px/1 var(--font-display); padding: 4px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; background: transparent; color: var(--brand-blue-dark); border: 1.5px solid var(--brand-blue); white-space: nowrap; }
.op-pill-outline i { font-size: 11px; }

.op-count-pill { font: 700 12px var(--font-mono); padding: 2px 9px; min-width: 24px; height: 22px; border-radius: 6px; background: var(--brand-blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.op-count-pill--danger { background: var(--brand-red); }

.op-tag { font: 500 12px var(--font-body); padding: 4px 10px; border-radius: 6px; background: var(--bg-muted); color: var(--fg-secondary); display: inline-flex; align-items: center; gap: 6px; }

.op-btn { font: 600 13.5px var(--font-display); padding: 0 16px; height: 38px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; line-height: 1; text-decoration: none; transition: background-color 120ms var(--ease-out), color 120ms var(--ease-out); }
.op-btn i { font-size: 14px; }
.op-btn:disabled, .op-btn.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.op-btn--primary { background: var(--brand-blue); color: #fff; }
.op-btn--primary:hover { background: var(--brand-blue-dark); color: #fff; }
.op-btn--olivia { background: var(--brand-teal); color: #fff; }
.op-btn--olivia:hover { background: var(--brand-teal-hover); color: #fff; }
.op-btn--success { background: #1F7A4D; color: #fff; }
.op-btn--success:hover { background: #18613B; color: #fff; }
.op-btn--secondary { background: var(--bg-surface); color: var(--fg-primary); border-color: var(--border-strong); }
.op-btn--secondary:hover { background: var(--bg-muted); }
.op-btn--ghost { background: transparent; color: var(--fg-secondary); }
.op-btn--ghost:hover { background: var(--bg-muted); color: var(--fg-primary); }
.op-btn--danger-outline { background: var(--bg-surface); color: var(--brand-red); border-color: rgba(192,57,43,.4); }
.op-btn--danger-outline:hover { background: var(--brand-warning-soft); }
.op-btn--sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.op-btn--lg { height: 48px; padding: 0 20px; font-size: 15px; }
.op-btn--cta { height: 56px; padding: 0 24px; font-size: 15px; }

/* OpButton with Href renders as <a>. Global [data-bs-theme="dark"] a rule (specificity 0,1,1)
   would otherwise win against .op-btn--variant (specificity 0,1,0). Re-assert per variant. */
[data-bs-theme="dark"] a.op-btn--primary,
[data-bs-theme="dark"] a.op-btn--primary:hover,
[data-bs-theme="dark"] a.op-btn--olivia,
[data-bs-theme="dark"] a.op-btn--olivia:hover,
[data-bs-theme="dark"] a.op-btn--success,
[data-bs-theme="dark"] a.op-btn--success:hover { color: #fff; }
[data-bs-theme="dark"] a.op-btn--secondary { color: var(--fg-primary); }
[data-bs-theme="dark"] a.op-btn--secondary:hover { color: var(--fg-primary); }
[data-bs-theme="dark"] a.op-btn--ghost { color: var(--fg-secondary); }
[data-bs-theme="dark"] a.op-btn--ghost:hover { color: var(--fg-primary); }
[data-bs-theme="dark"] a.op-btn--danger-outline,
[data-bs-theme="dark"] a.op-btn--danger-outline:hover { color: var(--brand-red); }

.op-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); box-shadow: var(--shadow-1); transition: box-shadow 200ms var(--ease-out); }
.op-card:hover { box-shadow: var(--shadow-2); }
.op-card .card-head { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border-subtle); }
.op-card .card-head h3 { margin: 0; font: 700 15px var(--font-display); color: var(--fg-primary); display: flex; align-items: center; gap: 8px; }
.op-card .card-head h3 .ico { color: var(--fg-secondary); display: inline-flex; }
.op-card .card-body { padding: 16px 20px; }

.op-olivia-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); box-shadow: var(--shadow-1); overflow: hidden; }
.op-olivia-card .hdr { background: var(--gradient-brand-horizontal); padding: 16px 22px; color: #fff; display: flex; align-items: center; gap: 12px; }
.op-olivia-card .hdr .ico { display: inline-flex; font-size: 22px; }
.op-olivia-card .hdr h2, .op-olivia-card .hdr h3 { margin: 0; font: 700 19px var(--font-display); color: #fff; }
.op-olivia-card .body { padding: 18px 22px; font: 400 14px/1.55 var(--font-body); color: var(--fg-primary); }

.op-hero-section { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-1); margin-bottom: 22px; }
.op-hero-section .hero-head { background: var(--brand-blue-dark); color: #fff; padding: 14px 22px; display: flex; align-items: center; gap: 10px; }
.op-hero-section .hero-head .ico { display: inline-flex; font-size: 18px; }
.op-hero-section .hero-head h3 { margin: 0; font: 700 17px var(--font-display); color: #fff; }
.op-hero-section .hero-body { padding: 22px 24px; }

.op-stat-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px 18px; }
.op-stat-card .label { font: 600 12px var(--font-display); color: var(--fg-tertiary); text-transform: uppercase; letter-spacing: .06em; }
.op-stat-card .num { font: 700 36px/1 var(--font-display); margin-top: 8px; color: var(--accent-primary); }
.op-stat-card--success .num { color: var(--semantic-success); }
.op-stat-card--warning .num { color: var(--semantic-warning); }
.op-stat-card--danger .num { color: var(--semantic-danger); }

.op-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 18px; padding: 0 4px; }
.op-tab { background: transparent; border: none; padding: 12px 16px; font: 500 13.5px var(--font-body); color: var(--fg-secondary); cursor: pointer; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.op-tab:hover { color: var(--fg-primary); }
.op-tab.active { color: var(--brand-blue-dark); font-weight: 600; border-bottom-color: var(--brand-blue); }
.op-tab .count { font: 600 11px var(--font-mono); color: inherit; opacity: .6; }
[data-bs-theme="dark"] .op-tab.active { color: var(--accent-primary-hover); border-bottom-color: var(--accent-primary); }

.op-toggle-bar { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-muted); border-radius: 8px; }
.op-toggle-bar button { background: transparent; border: none; padding: 8px 14px; font: 600 13px var(--font-display); color: var(--fg-secondary); cursor: pointer; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; }
.op-toggle-bar button.active { background: var(--brand-blue); color: #fff; }
[data-bs-theme="dark"] .op-toggle-bar button.active { background: var(--brand-blue-dark); }

.op-icon-btn { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border-subtle); background: var(--bg-surface); color: var(--fg-tertiary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: color 120ms var(--ease-out), border-color 120ms var(--ease-out), background 120ms var(--ease-out); }
.op-icon-btn:hover { color: var(--fg-primary); border-color: var(--border-strong); }
.op-icon-btn i { font-size: 14px; }
.op-icon-btn--view:hover { color: var(--brand-blue); border-color: var(--brand-blue); }
.op-icon-btn--pause:hover { color: #C58A1A; border-color: #C58A1A; }
.op-icon-btn--delete:hover { color: var(--brand-red); border-color: var(--brand-red); }
[data-bs-theme="dark"] .op-icon-btn { background: transparent; }
[data-bs-theme="dark"] .op-icon-btn:hover { background: rgba(255,255,255,.08); }

.op-table { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-1); }
.op-table table { width: 100%; border-collapse: collapse; }
.op-table th { text-align: left; font: 600 12.5px/1 var(--font-display); color: var(--fg-secondary); padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-surface); cursor: pointer; text-transform: uppercase; letter-spacing: .04em; }
.op-table th .sortcaret { color: var(--fg-disabled); margin-left: 4px; font-size: 10px; }
.op-table td { padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); font: 400 13.5px var(--font-body); color: var(--fg-primary); vertical-align: middle; }
.op-table tr:last-child td { border-bottom: none; }
.op-table tbody tr:nth-child(even) td { background: #FBFCFD; }
.op-table tbody tr:hover td, .op-table tbody tr:nth-child(even):hover td { background: var(--bg-subtle); }
.op-table .title-link { color: var(--brand-blue-dark); font-weight: 500; }
.op-table .row-actions { display: flex; gap: 4px; align-items: center; justify-content: flex-end; }
[data-bs-theme="dark"] .op-table tbody tr:nth-child(even) td { background: var(--bg-subtle); }
[data-bs-theme="dark"] .op-table tbody tr:hover td, [data-bs-theme="dark"] .op-table tbody tr:nth-child(even):hover td { background: var(--bg-muted); }
[data-bs-theme="dark"] .op-table .title-link { color: var(--accent-primary-hover); }

.op-table-toolbar { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-bottom: none; border-radius: var(--radius-md) var(--radius-md) 0 0; padding: 12px 14px; display: flex; gap: 10px; align-items: center; }
.op-table-toolbar + .op-table { border-radius: 0 0 var(--radius-md) var(--radius-md); border-top: none; }
.op-table-toolbar .search { position: relative; flex: 1; max-width: 280px; }
.op-table-toolbar .search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--fg-tertiary); pointer-events: none; }
.op-table-toolbar .search input { width: 100%; height: 34px; border-radius: 6px; border: 1px solid var(--border-strong); padding: 0 12px 0 32px; font: 400 13px var(--font-body); outline: none; background: var(--bg-surface); color: var(--fg-primary); }
.op-table-toolbar select { height: 34px; border-radius: 6px; border: 1px solid var(--border-strong); padding: 0 10px; font: 400 13px var(--font-body); background: var(--bg-surface); color: var(--fg-primary); outline: none; }

.next-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-1); margin-bottom: 16px; }
.next-card .nhead { background: var(--gradient-brand-horizontal); color: #fff; padding: 16px 22px; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; }
.next-card.offer .nhead { background: linear-gradient(90deg, #07796B, #1F8A5B); }
.next-card .nhead .av { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .20); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.next-card .nhead .who { font: 600 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; opacity: .9; color: #fff; }
.next-card .nhead .title { font: 700 20px var(--font-display); color: #fff; }
.next-card .nbody { padding: 20px 24px; }
.next-card .nbody p { margin: 0 0 14px; font: 400 15px/1.55 var(--font-body); color: var(--fg-primary); }
.next-card .nbody p:last-child { margin-bottom: 0; }
.next-card .ncta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.bg-steps { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding: 14px; background: var(--bg-subtle); border-radius: 10px; }
.bg-step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: center; padding: 8px 0; }
.bg-step .bd { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; font: 700 11px var(--font-mono); color: var(--fg-tertiary); background: var(--bg-surface); }
.bg-step.done .bd { background: var(--brand-teal); border-color: var(--brand-teal); color: #fff; }
.bg-step.active .bd { background: var(--bg-surface); border-color: var(--brand-blue); color: var(--brand-blue); box-shadow: 0 0 0 4px rgba(35, 141, 193, .16); }
.bg-step.failed .bd { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.bg-step .lbl { font: 500 13.5px var(--font-body); color: var(--fg-secondary); }
.bg-step.done .lbl, .bg-step.active .lbl { color: var(--fg-primary); }
.bg-step.active .lbl { font-weight: 600; }
.bg-step.failed .lbl { color: var(--brand-red); }
.bg-step .lbl-sub { display: block; font: 400 12px var(--font-body); color: var(--fg-tertiary); margin-top: 1px; }
.bg-step.active .lbl-sub { color: var(--brand-blue); }
