/* RosterMD branding theme (Doha Dynamics). */

:root {
    --dd-black: #000000;
    --dd-near-black: #111111;
    --dd-teal: #18CB96;
    --dd-dark-teal: #0F9F7A;
    --dd-light-teal: #E9FBF5;
    --dd-soft-grey: #F6F8FA;
    --dd-medium-grey: #6B7280;
    --dd-border-grey: #E5E7EB;
    --dd-white: #FFFFFF;

    --dd-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --dd-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);

    /* Theme Variables */
    --bg-color: #F6F8FA;
    --bg-body: #FFFFFF;
    --card-bg: #FFFFFF;
    --card-header-bg: rgba(246, 248, 250, 0.92);
    --text-color: #111111;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --input-bg: #FFFFFF;
    --input-border: #E5E7EB;
    --table-header-bg: rgba(246, 248, 250, 0.92);
    --table-hover-bg: rgba(233, 251, 245, 0.8);
    --nav-bg: rgba(255, 255, 255, 0.94);
    --nav-hover-bg: rgba(24, 203, 150, 0.12);
    --nav-active-bg: #E9FBF5;
    --modal-bg: #FFFFFF;
    --modal-backdrop: rgba(0, 0, 0, 0.5);
}

body.dark-mode {
    --bg-color: #0f172a;
    --bg-body: #1e293b;
    --card-bg: #1e293b;
    --card-header-bg: #334155;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --input-bg: #1e293b;
    --input-border: #475569;
    --table-header-bg: #334155;
    --table-hover-bg: rgba(24, 203, 150, 0.15);
    --nav-bg: rgba(30, 41, 59, 0.95);
    --nav-hover-bg: rgba(24, 203, 150, 0.2);
    --nav-active-bg: rgba(24, 203, 150, 0.25);
    --modal-bg: #1e293b;
    --modal-backdrop: rgba(0, 0, 0, 0.7);
    --dd-soft-grey: #0f172a;
    --dd-near-black: #e2e8f0;
    --dd-medium-grey: #94a3b8;
    --dd-border-grey: #334155;
    --dd-white: #1e293b;
    --dd-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --dd-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Typography System */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.875rem;
}

h3 {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

h4, h5, h6 {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

small, .small {
    font-size: 0.75rem;
    font-weight: 400;
}

label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--dd-medium-grey);
}

.text-monospace {
    font-family: 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', monospace;
}

/* Branding header/footer */
.brand-header {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--dd-border-grey);
    box-shadow: var(--dd-shadow-sm);
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
}

.brand-logo {
    display: block;
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

.brand-title {
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.1;
    color: var(--dd-near-black);
}

.brand-tagline {
    color: var(--dd-medium-grey);
    font-size: 0.875rem;
    margin: 0.1rem 0 0 0;
}

.brand-byline {
    color: var(--dd-medium-grey);
    font-size: 0.75rem;
}

.brand-footer {
    color: var(--dd-medium-grey);
    font-size: 0.875rem;
    padding: 1.25rem 0 0.5rem 0;
}

@media (max-width: 576px) {
    .brand-header {
        padding: 0.85rem 0.9rem;
    }
    .brand-header .brand-right {
        width: 100%;
        justify-content: space-between;
    }
    .brand-header .text-end {
        text-align: left !important;
    }
}

/* Page baseline */
body.bg-light {
    background: var(--dd-soft-grey) !important;
    color: var(--dd-near-black);
}

.container.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.75rem !important;
}

/* Header polish */
h1 {
    letter-spacing: -0.01em;
}

#currentUserDisplay {
    font-weight: 600;
}

/* Make DB badge subtle */
span.badge.text-bg-secondary {
    background-color: rgba(229, 231, 235, 0.8) !important;
    color: var(--dd-medium-grey) !important;
    border: 1px solid var(--dd-border-grey);
}

/* Navigation (admin product feel) */
.admin-shell-nav {
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid var(--dd-border-grey);
    box-shadow: var(--dd-shadow-sm);
    padding: 0.35rem 0.45rem !important;
    border-radius: 0.5rem !important;
    gap: 0.25rem;
}

.admin-shell-nav .nav-link {
    border-radius: 0.5rem;
    padding: 0.45rem 0.75rem;
    color: var(--dd-medium-grey) !important;
    font-weight: 500;
}

.admin-shell-nav .nav-link:hover {
    background: rgba(24, 203, 150, 0.12);
    color: var(--dd-near-black) !important;
}

.admin-shell-nav .nav-link.active {
    background: var(--dd-light-teal) !important;
    color: var(--dd-near-black) !important;
    border: 1px solid rgba(24, 203, 150, 0.35);
}

/* Visual dividers for navigation grouping */
.admin-shell-nav .nav-item:nth-child(3),  /* Block Setup - start of workflow group */
.admin-shell-nav .nav-item:nth-child(6),  /* Solve & Publish - start of execution group */
.admin-shell-nav .nav-item:nth-child(8) { /* Debug - start of debug group */
    border-left: 1px solid var(--dd-border-grey);
    margin-left: 0.5rem;
    padding-left: 0.5rem;
}

/* Mobile: horizontal scrollable navigation instead of wrapping */
@media (max-width: 768px) {
    .admin-shell-nav {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--dd-border-grey) transparent;
    }

    .admin-shell-nav::-webkit-scrollbar {
        height: 6px;
    }

    .admin-shell-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .admin-shell-nav::-webkit-scrollbar-thumb {
        background: var(--dd-border-grey);
        border-radius: 3px;
    }

    .admin-shell-nav .nav-link {
        white-space: nowrap;
    }
}

/* Cards */
.card {
    border: 1px solid var(--dd-border-grey) !important;
    border-radius: 0.5rem !important;
    box-shadow: var(--dd-shadow-sm);
    background: var(--dd-white);
}

.card-header {
    background: rgba(246, 248, 250, 0.92) !important;
    border-bottom: 1px solid var(--dd-border-grey) !important;
    font-weight: 600;
    color: var(--dd-near-black);
    padding: 0.75rem 1rem;
}

.card-body {
    padding: 1rem;
}

/* Helper text */
.helper-note,
.form-text,
.text-muted.small {
    color: var(--dd-medium-grey) !important;
}

/* Summary tiles */
.summary-tile,
.master-summary-card,
.quick-link-card {
    border: 1px solid var(--dd-border-grey) !important;
    box-shadow: var(--dd-shadow-sm) !important;
    border-radius: 0.5rem !important;
    background: var(--dd-white) !important;
}

.summary-tile .summary-label,
.master-summary-card .summary-label {
    color: var(--dd-medium-grey) !important;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.summary-tile .summary-value,
.master-summary-card .summary-value {
    font-weight: 700;
}

/* Workflow pills */
.workflow-step-pill {
    border: 1px solid var(--dd-border-grey) !important;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.9);
}

.workflow-step-pill.workflow-step-active {
    background: var(--dd-teal);
    border-color: var(--dd-dark-teal) !important;
    font-weight: 500;
}

.workflow-step-num {
    background: var(--dd-dark-teal) !important;
}

/* Badges (consistent palette, WCAG 2.1 AA compliant - contrast ≥4.5:1) */
.badge.text-bg-success { background-color: #15803d !important; color: #ffffff !important; }
.badge.text-bg-warning { background-color: #d97706 !important; color: #ffffff !important; }
.badge.text-bg-danger  { background-color: #dc2626 !important; color: #ffffff !important; }
.badge.text-bg-secondary { background-color: #6b7280 !important; color: #ffffff !important; }
.badge.text-bg-info { background-color: #0891b2 !important; color: #ffffff !important; }
.badge.text-bg-primary { background-color: #0f9f7a !important; color: #ffffff !important; }
.badge.text-bg-dark { background-color: var(--dd-near-black) !important; color: #ffffff !important; }

/* Buttons */
.btn-primary {
    background-color: var(--dd-dark-teal) !important;
    border-color: var(--dd-dark-teal) !important;
    color: var(--dd-white) !important;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: #0b8c6c !important;
    border-color: #0b8c6c !important;
}

.btn-outline-primary {
    color: var(--dd-dark-teal) !important;
    border-color: rgba(15, 159, 122, 0.45) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: rgba(24, 203, 150, 0.14) !important;
    border-color: rgba(15, 159, 122, 0.55) !important;
}

.btn-success {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
}

.btn-warning {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #111827 !important;
}

.btn-link {
    color: var(--dd-medium-grey) !important;
}
.btn-link:hover {
    color: var(--dd-near-black) !important;
}

/* Tables */
.table {
    background: var(--dd-white);
}
.table thead th {
    background: rgba(246, 248, 250, 0.92) !important;
    color: var(--dd-near-black);
    font-weight: 700;
    font-size: 0.875rem;
    border-bottom-color: var(--dd-border-grey) !important;
}
.table td,
.table th {
    vertical-align: middle !important;
    border-color: var(--dd-border-grey) !important;
}
.table-hover tbody tr:hover {
    background: rgba(233, 251, 245, 0.8);
}

/* Empty states */
.alert.alert-light.border {
    background: rgba(246, 248, 250, 0.95) !important;
    border-color: var(--dd-border-grey) !important;
}

/* Debug outputs remain secondary */
pre {
    border-color: var(--dd-border-grey) !important;
    box-shadow: none;
}

/* Getting Started Workflow Styles */
#gettingStartedCard {
    border-left: 4px solid var(--dd-teal) !important;
}

.workflow-steps {
    max-width: 900px;
}

.workflow-step {
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.15s ease;
}

.workflow-step:hover {
    background: rgba(24, 203, 150, 0.04);
}

.workflow-step-badge {
    min-width: 32px;
    padding-top: 0.15rem;
}

.workflow-step-badge .badge {
    font-size: 0.875rem;
    padding: 0.35rem 0.55rem;
    font-weight: 600;
}

.workflow-step .fw-semibold {
    color: var(--dd-near-black);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.workflow-step .text-muted.small {
    line-height: 1.4;
    margin-bottom: 0.35rem;
}

.workflow-step .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.65rem;
}

#gettingStartedCard.d-none {
    display: none !important;
}

/* Empty State Cards */
.empty-state-card {
    background: linear-gradient(135deg, rgba(24, 203, 150, 0.03) 0%, rgba(24, 203, 150, 0.08) 100%);
    border: 2px dashed rgba(24, 203, 150, 0.3);
    border-radius: 0.5rem;
    padding: 2.5rem 2rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.85;
}

.empty-state-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dd-near-black);
    margin-bottom: 0.65rem;
    letter-spacing: -0.01em;
}

.empty-state-message {
    color: var(--dd-medium-grey);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-actions {
    display: flex;
    gap: 0.65rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.empty-state-note {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(24, 203, 150, 0.2);
    font-size: 0.875rem;
    color: var(--dd-medium-grey);
}

.empty-state-note strong {
    color: var(--dd-near-black);
    font-weight: 600;
}

.empty-state-card.d-none {
    display: none !important;
}

@media (max-width: 576px) {
    .empty-state-card {
        padding: 2rem 1.5rem;
    }

    .empty-state-icon {
        font-size: 2.5rem;
    }

    .empty-state-title {
        font-size: 1rem;
    }

    .empty-state-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .empty-state-actions .btn {
        width: 100%;
    }
}

/* Compact Empty State Cards (for nested sections) */
.empty-state-card-compact {
    background: linear-gradient(135deg, rgba(24, 203, 150, 0.02) 0%, rgba(24, 203, 150, 0.05) 100%);
    border: 1.5px dashed rgba(24, 203, 150, 0.25);
    border-radius: 0.5rem;
    padding: 1.5rem 1.25rem;
    text-align: center;
}

.empty-state-icon-small {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.65rem;
    opacity: 0.8;
}

.empty-state-title-small {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dd-near-black);
    margin-bottom: 0.5rem;
}

.empty-state-message-small {
    color: var(--dd-medium-grey);
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-actions-small {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-state-card-compact.d-none {
    display: none !important;
}

@media (max-width: 576px) {
    .empty-state-card-compact {
        padding: 1.25rem 1rem;
    }

    .empty-state-icon-small {
        font-size: 1.75rem;
    }

    .empty-state-actions-small {
        flex-direction: column;
        align-items: stretch;
    }

    .empty-state-actions-small .btn {
        width: 100%;
    }
}

/* Solver Progress UI */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin-animation {
    display: inline-block;
    animation: spin 2s linear infinite;
}

.solve-progress-container {
    padding: 1rem;
    background: rgba(24, 203, 150, 0.04);
    border: 1px solid rgba(24, 203, 150, 0.2);
    border-radius: 0.5rem;
}

.solve-progress-timer {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dd-near-black);
}

.solve-progress-bar-container {
    height: 24px;
    background: rgba(229, 231, 235, 0.5);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.solve-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--dd-teal) 0%, var(--dd-dark-teal) 100%);
    transition: width 0.3s ease;
    border-radius: 0.5rem;
}

.solve-success-container {
    padding: 1rem;
    background: rgba(22, 163, 74, 0.06);
    border: 1px solid rgba(22, 163, 74, 0.25);
    border-radius: 0.5rem;
}

.solve-error-container {
    padding: 1rem;
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 0.5rem;
}

/* Workload Table */
.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
}

.sortable-header:hover {
    background-color: rgba(24, 203, 150, 0.08) !important;
}

.sortable-header .sort-icon::after {
    content: " ⇅";
    opacity: 0.3;
    font-size: 0.875rem;
}

.sortable-header.sort-asc .sort-icon::after {
    content: " ▲";
    opacity: 0.9;
}

.sortable-header.sort-desc .sort-icon::after {
    content: " ▼";
    opacity: 0.9;
}

/* Workflow step indicator */
.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.workflow-step-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--dd-soft-grey);
    border: 2px solid var(--dd-border-grey);
    color: var(--dd-medium-grey);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.workflow-step-label {
    font-size: 0.75rem;
    color: var(--dd-medium-grey);
    text-align: center;
    font-weight: 500;
}

.workflow-step-complete .workflow-step-icon {
    background-color: #16a34a;
    border-color: #16a34a;
    color: white;
}

.workflow-step-complete .workflow-step-label {
    color: #16a34a;
    font-weight: 600;
}

.workflow-step-active .workflow-step-icon {
    background-color: var(--dd-teal);
    border-color: var(--dd-dark-teal);
    color: var(--dd-near-black);
    box-shadow: 0 0 0 0.25rem rgba(24, 203, 150, 0.25);
    animation: pulse 2s infinite;
}

.workflow-step-active .workflow-step-label {
    color: var(--dd-dark-teal);
    font-weight: 700;
}

.workflow-step-future .workflow-step-icon {
    background-color: var(--dd-white);
    border-color: var(--dd-border-grey);
    color: var(--dd-medium-grey);
}

.workflow-step-future .workflow-step-label {
    color: var(--dd-medium-grey);
}

.workflow-arrow {
    flex: 0 0 auto;
    font-size: 1rem;
    color: var(--dd-medium-grey);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0.25rem rgba(24, 203, 150, 0.25);
    }
    50% {
        box-shadow: 0 0 0 0.5rem rgba(24, 203, 150, 0.15);
    }
}

/* Responsive workflow */
@media (max-width: 768px) {
    .workflow-step-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    .workflow-step-label {
        font-size: 0.75rem;
    }

    .workflow-arrow {
        font-size: 0.875rem;
    }
}

/* Accessibility: Skip Navigation Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--dd-near-black);
    color: var(--dd-white);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0.5rem;
    z-index: 9999;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--dd-teal);
    outline-offset: 2px;
}

/* Accessibility: Focus visible for keyboard navigation */
.notification-bell:focus-visible {
    outline: 3px solid var(--dd-teal);
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "→";
    color: var(--dd-medium-grey);
    opacity: 0.6;
}

.breadcrumb-item a {
    color: var(--dd-medium-grey);
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumb-item a:hover {
    color: var(--dd-dark-teal);
}

.breadcrumb-item.active {
    color: var(--dd-dark-teal);
    font-weight: 500;
}

/* Enterprise Footer */
.enterprise-footer {
    margin-top: auto;
    background-color: #f8f9fa !important;
}

.enterprise-footer a {
    text-decoration: none;
    transition: color 0.15s ease;
}

.enterprise-footer a:hover {
    color: var(--dd-teal) !important;
}

/* ==============================================================================
   Table Sorting and Search Styles
   ============================================================================== */

/* Sortable table headers */
th.sortable-header,
th[data-sort] {
    cursor: pointer;
    user-select: none;
    position: relative;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

th.sortable-header:hover,
th[data-sort]:hover {
    background-color: rgba(24, 203, 150, 0.1) !important;
}

/* Sort icon styling */
.sort-icon {
    opacity: 0.3;
    font-size: 0.75rem;
    transition: opacity 0.15s ease, color 0.15s ease;
}

th.sortable-header:hover .sort-icon,
th[data-sort]:hover .sort-icon {
    opacity: 0.6;
}

th.sort-asc .sort-icon,
th.sort-desc .sort-icon {
    opacity: 1;
    color: var(--dd-teal);
}

/* Active sort state */
th.sort-asc,
th.sort-desc {
    background-color: rgba(24, 203, 150, 0.05) !important;
    font-weight: 600;
}

/* Search and filter controls */
.search-container {
    position: relative;
}

.search-container input:focus,
input[type="text"][placeholder*="🔍"]:focus {
    border-color: var(--dd-teal);
    box-shadow: 0 0 0 0.2rem rgba(24, 203, 150, 0.25);
}

.filter-summary {
    font-size: 0.875rem;
    color: var(--dd-medium-grey);
    font-style: italic;
}

/* Filter select styling */
.form-select:focus {
    border-color: var(--dd-teal);
    box-shadow: 0 0 0 0.2rem rgba(24, 203, 150, 0.25);
}

/* Bulk Actions Toolbar */
.bulk-actions-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: 2px solid var(--dd-teal);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Activity Log Timeline */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--dd-border-grey);
}

.timeline-entry {
    position: relative;
    padding-left: 50px;
    padding-bottom: 1.5rem;
}

.timeline-entry:last-child {
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--dd-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--dd-teal);
}

.timeline-content {
    background: var(--dd-soft-grey);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--dd-teal);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dd-near-black);
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--dd-medium-grey);
}

.timeline-details {
    font-size: 0.875rem;
    color: var(--dd-medium-grey);
}

.timeline-user {
    font-size: 0.75rem;
    color: var(--dd-teal);
    font-weight: 500;
}

/* ==============================================================================
   Skeleton Loading Animation
   ============================================================================== */

/* Base skeleton element */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    display: inline-block;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Skeleton row for tables */
.skeleton-row {
    height: 40px;
    margin-bottom: 8px;
    width: 100%;
}

/* Skeleton card for KPIs and summary tiles */
.skeleton-card {
    height: 100px;
    width: 100%;
}

/* Skeleton text lines (varying widths for realism) */
.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text-sm {
    height: 12px;
    margin-bottom: 6px;
}

.skeleton-text-lg {
    height: 20px;
    margin-bottom: 10px;
}

/* Width variants for variety */
.skeleton-w-100 { width: 100%; }
.skeleton-w-90 { width: 90%; }
.skeleton-w-80 { width: 80%; }
.skeleton-w-70 { width: 70%; }
.skeleton-w-60 { width: 60%; }
.skeleton-w-50 { width: 50%; }
.skeleton-w-40 { width: 40%; }
.skeleton-w-30 { width: 30%; }

/* Table skeleton rows */
.skeleton-table-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 8px;
    border-bottom: 1px solid var(--dd-border-grey);
}

.skeleton-table-cell {
    flex: 1;
    height: 20px;
}

/* Skeleton for summary cards */
.skeleton-summary-card {
    padding: 1rem;
    background: var(--dd-white);
    border: 1px solid var(--dd-border-grey);
    border-radius: 0.5rem;
}

.skeleton-summary-label {
    width: 60%;
    height: 14px;
    margin-bottom: 12px;
}

.skeleton-summary-value {
    width: 40%;
    height: 32px;
}

/* ============================================================
   Print Stylesheet - Optimized for Roster Schedule Printing
   ============================================================ */

@media print {
    /* Hide non-essential elements */
    .no-print,
    nav,
    .nav,
    .navbar,
    .nav-pills,
    .nav-pills-container,
    .admin-shell-nav,
    .brand-header,
    .brand-footer,
    .enterprise-footer,
    button,
    .btn,
    .btn-group,
    .alert,
    .modal,
    .bulk-actions-toolbar,
    input[type="checkbox"],
    .pagination,
    #pilot-banner,
    .notification-bell,
    #logoutBtn,
    .badge,
    .helper-note,
    .workflow-step-pill {
        display: none !important;
    }

    /* Reset page layout */
    body {
        background: white !important;
        font-size: 10pt;
        color: black !important;
        margin: 0;
        padding: 0;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Print header */
    .print-header {
        display: block !important;
        border-bottom: 2px solid #000;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
        page-break-after: avoid;
    }

    .print-header h1 {
        font-size: 18pt;
        margin: 0 0 0.5rem 0;
        font-weight: bold;
    }

    .print-header .print-metadata {
        font-size: 9pt;
        color: #666;
    }

    /* Card styling for print */
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 1rem !important;
    }

    .card-header {
        background: #f0f0f0 !important;
        border-bottom: 1px solid #000 !important;
        font-weight: bold;
        font-size: 11pt;
        padding: 0.5rem !important;
    }

    .card-body {
        padding: 0.5rem !important;
    }

    /* Table optimization */
    table {
        width: 100%;
        border-collapse: collapse;
        page-break-inside: avoid;
        font-size: 9pt;
    }

    table th,
    table td {
        border: 1px solid #000 !important;
        padding: 0.3rem !important;
    }

    table th {
        background: #e0e0e0 !important;
        font-weight: bold;
        text-align: left;
    }

    /* Summary tiles */
    .summary-tile {
        border: 1px solid #ccc !important;
        padding: 0.3rem !important;
        background: white !important;
        page-break-inside: avoid;
    }

    .summary-label {
        font-size: 8pt;
        font-weight: bold;
    }

    .summary-value {
        font-size: 10pt;
        font-weight: bold;
    }

    /* Roster calendar view */
    .roster-calendar-scroll {
        overflow: visible !important;
        white-space: normal !important;
    }

    .roster-day-card {
        border: 1px solid #000 !important;
        page-break-inside: avoid;
        margin-bottom: 0.5rem;
        display: inline-block;
        width: 180px;
        vertical-align: top;
    }

    .roster-shift-section {
        border: 1px solid #000 !important;
        padding: 0.3rem !important;
        margin-bottom: 0.3rem !important;
    }

    .roster-shift-section.early {
        background: #e8f5e9 !important;
    }

    .roster-shift-section.late {
        background: #e3f2fd !important;
    }

    .roster-shift-section.night {
        background: #f5f5f5 !important;
    }

    /* Calendar grid for print */
    .workflow-calendar-scroll {
        overflow: visible !important;
    }

    .workflow-calendar-grid,
    .workflow-calendar-weekdays {
        display: grid !important;
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 2px !important;
    }

    .workflow-calendar-cell {
        border: 1px solid #000 !important;
        padding: 0.25rem !important;
        font-size: 8pt;
        page-break-inside: avoid;
        min-height: auto !important;
    }

    .workflow-calendar-weekday {
        background: #e0e0e0 !important;
        border: 1px solid #000 !important;
        text-align: center;
        font-weight: bold;
        padding: 0.2rem !important;
        font-size: 8pt;
    }

    /* Workload table */
    #workloadTable th,
    #workloadTable td {
        text-align: center;
    }

    #workloadTable th:first-child,
    #workloadTable td:first-child {
        text-align: left;
    }

    /* Page breaks */
    .page-break {
        page-break-after: always;
    }

    /* Force landscape for wide tables */
    @page {
        size: landscape;
        margin: 1cm;
    }

    /* Compact spacing for print */
    .row {
        margin-bottom: 0.5rem !important;
    }

    .mb-3, .mb-2 {
        margin-bottom: 0.5rem !important;
    }

    /* Hide empty states and debug sections */
    #workflowDebugCollapse,
    #reviewCalendarEmpty,
    #rosterReviewEmpty,
    #savedAssignmentsEmpty,
    #preferenceSatisfactionEmpty,
    #workflowCalendarEmpty {
        display: none !important;
    }

    /* Ensure text is readable */
    * {
        color: black !important;
        text-shadow: none !important;
    }

    a {
        text-decoration: none !important;
    }

    /* Compact form elements that slip through */
    select, input, textarea {
        border: 1px solid #000 !important;
        font-size: 9pt;
        display: none; /* Hide form inputs in print */
    }

    /* Show labels without form controls */
    label {
        font-size: 9pt;
        font-weight: bold;
    }
}

/* ==============================================================================
   Command Palette Styles (Ctrl+K)
   ============================================================================== */

#commandPaletteModal .modal-dialog {
    max-width: 600px;
    margin-top: 10vh;
}

#commandPaletteModal .modal-content {
    border-radius: 0.75rem;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--dd-border-grey);
}

.command-palette-search {
    border: none;
    border-bottom: 1px solid var(--dd-border-grey);
    border-radius: 0;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    outline: none;
    box-shadow: none;
}

.command-palette-search:focus {
    border-bottom-color: var(--dd-teal);
    box-shadow: none;
}

.command-palette-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.command-palette-item {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.command-palette-item:hover {
    background: rgba(24, 203, 150, 0.06);
    border-left-color: var(--dd-teal);
}

.command-palette-item.selected {
    background: rgba(24, 203, 150, 0.12);
    border-left-color: var(--dd-teal);
}

.command-palette-icon {
    width: 24px;
    text-align: center;
    color: var(--dd-medium-grey);
    font-size: 1rem;
}

.command-palette-item.selected .command-palette-icon {
    color: var(--dd-teal);
}

.command-palette-text {
    flex: 1;
}

.command-palette-label {
    font-weight: 500;
    color: var(--dd-near-black);
    display: block;
    font-size: 0.9rem;
}

.command-palette-item.selected .command-palette-label {
    color: var(--dd-near-black);
}

.command-palette-description {
    font-size: 0.75rem;
    color: var(--dd-medium-grey);
    margin-top: 0.1rem;
}

.command-palette-shortcut {
    font-size: 0.7rem;
    color: var(--dd-medium-grey);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

.command-palette-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--dd-medium-grey);
}

.command-palette-footer {
    border-top: 1px solid var(--dd-border-grey);
    padding: 0.65rem 1.25rem;
    background: rgba(246, 248, 250, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--dd-medium-grey);
}

.command-palette-footer-hint {
    display: flex;
    gap: 1rem;
}

.command-palette-footer-hint span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.command-palette-footer-key {
    background: rgba(0, 0, 0, 0.08);
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-weight: 600;
}

/* SLA Tracking for Unavailability Requests */
.sla-warning {
    background-color: #fff3cd !important;
    transition: background-color 0.2s ease;
}

.sla-overdue {
    background-color: #f8d7da !important;
    transition: background-color 0.2s ease;
}

.sla-overdue-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #dc3545;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.sla-warning-banner {
    position: sticky;
    top: 0;
    z-index: 1020;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

body.dark-mode .sla-warning {
    background-color: rgba(255, 193, 7, 0.2) !important;
}

body.dark-mode .sla-overdue {
    background-color: rgba(220, 53, 69, 0.2) !important;
}

