/* ============================================================
   MyGreat.Cloud – consolidated styles
   ============================================================ */

/* ---------- Root & body ---------- */
html {
    font-size: 90%;
}

.project-graph-node-selected rect {
    stroke-width: 3px;
}

.project-graph-node-connect-source rect {
    stroke: var(--bs-info) !important;
    stroke-width: 4px;
}

.project-graph-link-selected {
    stroke-width: 3.5px;
}

.project-graph-edge-running {
    animation: project-graph-edge-flow 1.6s linear infinite;
}

@keyframes project-graph-edge-flow {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -20;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-graph-edge-running {
        animation: none;
    }
}

:root {
    color-scheme: dark;
    --app-sidebar-width: 240px;
    --app-shell-bg: #0f1115;
    --app-shell-fg: #e6e6e6;
    --app-sidebar-bg: #141824;
    --app-surface: #151a22;
    --app-surface-muted: #171d2b;
    --app-border: #2b2f3a;
    --app-border-strong: #2b3448;
    --app-muted: #9aa0a6;
    --app-link: #9ecbff;
    --app-link-hover: #dce6ff;
    --app-nav-link: #aab2bd;
    --app-nav-hover-bg: #1e2430;
    --app-nav-active-bg: #1b2232;
    --app-nav-active-fg: #9ecbff;
    --app-nav-active-border: #5aa2ff;
    --app-user-trigger-bg: #1b2232;
    --app-user-trigger-hover-bg: #222b3d;
    --app-user-trigger-border: #2b3448;
    --app-user-trigger-hover-border: #3a465f;
    --app-user-trigger-fg: #d6deee;
    --app-user-trigger-hover-fg: #eef4ff;
    --app-user-name: #eef4ff;
    --app-user-email: #9fb0cc;
    --app-avatar-bg: #2e3a52;
    --app-avatar-fg: #dce7ff;
    --app-table-head-bg: #171d2b;
    --app-table-head-fg: #b9c2d3;
    --app-table-head-border: #323a4b;
    --app-row-hover-bg: #1b2232;
    --app-badge-border: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="light"] {
    color-scheme: light;
    --app-shell-bg: #f4f7fb;
    --app-shell-fg: #1d2430;
    --app-sidebar-bg: #ffffff;
    --app-surface: #ffffff;
    --app-surface-muted: #edf2f8;
    --app-border: #d5deea;
    --app-border-strong: #c0ccdb;
    --app-muted: #66758a;
    --app-link: #0d6efd;
    --app-link-hover: #084298;
    --app-nav-link: #4c5d75;
    --app-nav-hover-bg: #eef4fb;
    --app-nav-active-bg: #e4eefb;
    --app-nav-active-fg: #0a58ca;
    --app-nav-active-border: #0d6efd;
    --app-user-trigger-bg: #f2f6fc;
    --app-user-trigger-hover-bg: #e7eef8;
    --app-user-trigger-border: #c8d4e3;
    --app-user-trigger-hover-border: #afbfd2;
    --app-user-trigger-fg: #1d2430;
    --app-user-trigger-hover-fg: #10243d;
    --app-user-name: #1d2430;
    --app-user-email: #5a6b82;
    --app-avatar-bg: #dce7f7;
    --app-avatar-fg: #28405f;
    --app-table-head-bg: #edf2f8;
    --app-table-head-fg: #556579;
    --app-table-head-border: #c8d4e3;
    --app-row-hover-bg: #eef4fb;
    --app-badge-border: rgba(0, 0, 0, 0.08);
}
body {
    height: 100vh;
    overflow: hidden;
    background: var(--app-shell-bg);
    color: var(--app-shell-fg);
}

.remote-provider-icon {
    width: 1.5rem;
    height: 1.5rem;
    box-sizing: border-box;
    display: inline-block;
    object-fit: contain;
    vertical-align: -0.35rem;
}

.remote-provider-icon--boxed {
    padding: 0.125rem;
    border-radius: 0.25rem;
    background: #fff;
}

/* ---------- Layout ---------- */
.sidebar {
    width: var(--app-sidebar-width);
    flex: 0 0 var(--app-sidebar-width);
    min-width: var(--app-sidebar-width);
    background: var(--app-sidebar-bg);
    border-right: 1px solid var(--app-border);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.app-shell-sidebar-desktop {
    width: var(--app-sidebar-width);
    flex: 0 0 var(--app-sidebar-width);
    min-width: 0;
    overflow: hidden;
    transition: width 0.2s ease, flex-basis 0.2s ease;
}
.app-shell-corner-toggle {
    position: fixed;
    bottom: 1rem;
    left: calc(var(--app-sidebar-width) - 1.25rem);
    z-index: 1035;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    color: var(--app-shell-fg);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    transition: left 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.sidebar-brand-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.75rem;
}
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.page-header-copy {
    min-width: 0;
    flex: 1 1 24rem;
}
.page-action-box {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    background: var(--app-surface);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}
.page-action-box .btn {
    white-space: nowrap;
}
.page-action-box-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--app-muted);
}
.page-action-box-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.page-action-box-buttons {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.page-action-box-run-cluster {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.onboarding-step-card {
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.onboarding-step-guidance li + li {
    margin-top: 0.25rem;
}
.onboarding-focus-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1030;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    animation: onboarding-focus-backdrop-fade 1.8s ease-in-out forwards;
}
[data-onboarding-focus-target].onboarding-focus-target-active {
    position: relative;
    z-index: 1031;
    animation: onboarding-focus-target-pulse 1.8s ease-in-out forwards;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.62), 0 1rem 2.5rem rgba(0, 0, 0, 0.38);
}
@keyframes onboarding-focus-backdrop-fade {
    0% {
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    82% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}
@keyframes onboarding-focus-target-pulse {
    0% {
        transform: scale(1);
    }
    18% {
        transform: scale(1.045);
    }
    42% {
        transform: scale(1);
    }
    64% {
        transform: scale(1.035);
    }
    100% {
        transform: scale(1);
    }
}
@media (prefers-reduced-motion: reduce) {
    .onboarding-focus-backdrop {
        animation: none;
        opacity: 0;
    }

    [data-onboarding-focus-target].onboarding-focus-target-active {
        animation: none;
        transform: none;
    }
}
.content-area {
    overflow-y: auto;
    height: 100vh;
    background: var(--app-shell-bg);
    scrollbar-gutter: stable;
}
.content-shell {
    padding: 1.5rem;
}
.table-clickable-row {
    cursor: pointer;
}
.table-hover tbody tr.table-clickable-row:hover > th,
.table-hover tbody tr.table-clickable-row:hover > td,
.table tbody tr.table-clickable-row:hover > th,
.table tbody tr.table-clickable-row:hover > td {
    background-color: rgba(13, 110, 253, 0.06);
}
.mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--app-shell-bg);
    padding-top: 0.25rem;
}
.mobile-sidebar-offcanvas {
    width: min(86vw, 320px);
    background: var(--app-sidebar-bg);
    color: var(--app-shell-fg);
}
.mobile-sidebar-offcanvas .offcanvas-header {
    border-bottom: 1px solid var(--app-border);
}
.mobile-sidebar-offcanvas .offcanvas-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mobile-sidebar-offcanvas .sidebar {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    border-right: 0;
    height: 100%;
}

/* ---------- List group overrides ---------- */
.list-group-item {
    background: var(--app-surface);
    color: var(--app-shell-fg);
    border-color: var(--app-border);
}
.list-group-item a {
    color: var(--app-link);
}
.list-group-item a.btn {
    color: var(--bs-btn-color);
}
.list-group-item a.btn:hover,
.list-group-item a.btn:focus {
    color: var(--bs-btn-hover-color, var(--bs-btn-color));
}

/* ---------- Bootstrap overrides ---------- */
.text-muted {
    color: var(--app-muted) !important;
}
.form-check-input {
    cursor: pointer;
}

.knowledge-base-help-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    color: var(--app-link);
    text-decoration: none;
    flex: 0 0 auto;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.knowledge-base-help-icon {
    width: 1rem;
    height: 1rem;
    display: block;
}

.knowledge-base-help-icon circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.knowledge-base-help-icon .knowledge-base-help-icon-dot,
.knowledge-base-help-icon .knowledge-base-help-icon-stem {
    fill: currentColor;
    stroke: none;
}

.knowledge-base-help-link:hover,
.knowledge-base-help-link:focus {
    background: var(--app-row-hover-bg);
    color: var(--app-link-hover);
}

.knowledge-base-inline-heading {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.knowledge-base-header-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}

.knowledge-base-header-row .btn {
    flex: 1 1 auto;
    min-width: 0;
}

.app-menu-toggle {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    color: var(--app-shell-fg);
}

.app-shell-corner-toggle:hover,
.app-shell-corner-toggle:focus,
.app-menu-toggle:hover,
.app-menu-toggle:focus {
    background: var(--app-row-hover-bg);
    border-color: var(--app-border-strong);
    color: var(--app-shell-fg);
}

.run-files-table {
    min-width: 1800px;
}

.run-files-col-select {
    min-width: 72px;
    width: 72px;
    white-space: nowrap;
}

.run-files-col-status {
    min-width: 90px;
    width: 90px;
    white-space: nowrap;
}

.run-file-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.25rem;
    min-width: 1.25rem;
    padding: 0.15rem 0.35rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.run-files-col-path {
    min-width: 420px;
    width: 32%;
    white-space: nowrap;
}

.run-files-col-proposed {
    min-width: 320px;
    width: 24%;
}

.run-files-col-proposed .files-proposed-rename-input {
    min-width: 280px;
    width: 100%;
}

.run-files-col-proposed .files-rename-job-status {
    min-width: 280px;
}

.run-stat-drilldown {
    line-height: 1;
    vertical-align: baseline;
}

.run-log-message-help {
    cursor: help;
    text-decoration: underline dotted;
    text-underline-offset: 0.18rem;
}

.run-message-tooltip {
    --bs-tooltip-max-width: 28rem;
}

.exclude-filter-browser-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
}

.exclude-filter-browser-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.exclude-filter-browser-panel {
    position: relative;
    z-index: 1;
    width: min(1080px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    margin: 1rem auto;
    display: flex;
    flex-direction: column;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
}

.exclude-filter-browser-panel .card-body {
    overflow: auto;
}

.exclude-filter-browser-list {
    min-height: 12rem;
}

.exclude-filter-browser-entry {
    background: var(--app-surface);
    border-color: var(--app-border);
}

.exclude-filter-browser-entry-rule {
    white-space: nowrap;
    overflow-x: auto;
    max-width: 100%;
    display: inline-block;
}

.exclude-filter-browser-entry-name {
    min-width: 0;
}

/* ---------- Sidebar branding ---------- */
.sidebar-brand .sidebar-logo {
    width: 120px;
    height: auto;
    opacity: 0.95;
}
.sidebar-brand .sidebar-title {
    font-weight: 600;
    color: var(--app-shell-fg);
    letter-spacing: 0.2px;
}

html[data-sidebar-collapsed="1"] .app-shell-sidebar-desktop {
    width: 0;
    flex-basis: 0;
}

html[data-sidebar-collapsed="1"] .app-shell-corner-toggle {
    left: 1rem;
}

/* ---------- Sidebar navigation ---------- */
.sidebar ul.nav .nav-link {
    padding: 0.4rem 0.75rem;
    color: var(--app-nav-link);
}
.sidebar-nav-link-content,
.sidebar-dropdown-item-content {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.sidebar-dropdown-item-content {
    width: 100%;
}

.app-nav-icon {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    color: currentColor;
    opacity: 0.9;
}

.sidebar ul.nav .nav-link .app-nav-icon {
    opacity: 0.82;
}

.sidebar ul.nav .nav-link:hover {
    color: var(--app-shell-fg);
    background-color: var(--app-nav-hover-bg);
    border-radius: 4px;
}
.sidebar ul.nav .nav-link.active {
    color: var(--app-nav-active-fg);
    font-weight: 500;
    background-color: var(--app-nav-active-bg);
    border-radius: 4px;
    border-left: 3px solid var(--app-nav-active-border);
    padding-left: calc(0.75rem - 3px);
}
.sidebar ul.nav .nav-link.active .app-nav-icon,
.sidebar ul.nav .nav-link:hover .app-nav-icon {
    opacity: 1;
}
.sidebar-meta {
    opacity: 0.7;
}
.sidebar-projects-nav {
    font-size: 0.9rem;
}
.sidebar-jobs-nav {
    font-size: 0.85rem;
}
.sidebar-job-name {
    max-width: 180px;
}
.sidebar-tenant-name {
    line-height: 1.25;
}

.sidebar-tenant-trigger {
    background: var(--app-user-trigger-bg);
    border: 1px solid var(--app-user-trigger-border);
    color: var(--app-user-trigger-fg);
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

.sidebar-tenant-trigger:hover,
.sidebar-tenant-trigger:focus {
    background: var(--app-user-trigger-hover-bg);
    border-color: var(--app-user-trigger-hover-border);
    color: var(--app-user-trigger-hover-fg);
}

.sidebar-tenant-menu {
    min-width: 16rem;
}

.sidebar-user-menu {
    width: 100%;
}

.sidebar-user-trigger {
    background: var(--app-user-trigger-bg);
    border: 1px solid var(--app-user-trigger-border);
    color: var(--app-user-trigger-fg);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
}

.sidebar-user-trigger:hover,
.sidebar-user-trigger:focus {
    background: var(--app-user-trigger-hover-bg);
    border-color: var(--app-user-trigger-hover-border);
    color: var(--app-user-trigger-hover-fg);
}

.sidebar-user-menu .dropdown-item .app-nav-icon {
    width: 0.95rem;
    height: 0.95rem;
    opacity: 0.85;
}

.sidebar-user-avatar,
.sidebar-user-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    flex: 0 0 32px;
}

.sidebar-user-avatar {
    object-fit: cover;
}

.sidebar-user-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--app-avatar-bg);
    color: var(--app-avatar-fg);
    font-size: 0.8rem;
    font-weight: 600;
}

.sidebar-user-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar-user-name,
.sidebar-user-email {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-name {
    font-size: 0.88rem;
    color: var(--app-user-name);
}

.sidebar-user-email {
    font-size: 0.74rem;
    color: var(--app-user-email);
}

/* ---------- Progress bar sizes ---------- */
.progress-lg {
    height: 14px;
}
.progress-sm {
    height: 10px;
}

/* ---------- Chart containers ---------- */
.chart-container {
    height: 280px;
}

/* ---------- Scrollable card body ---------- */
.card-body-scroll {
    max-height: 500px;
    overflow-y: auto;
}

.run-detail-list-scroll {
    padding: 0;
}

.run-detail-table-scroll,
.run-detail-list-table-scroll {
    max-height: 500px;
    overflow: auto;
    padding: 0 1rem 1rem;
}

.run-detail-list-controls {
    margin: 0;
    padding: 1rem 1rem 0.75rem;
}

.run-live-value,
.run-live-meta-value {
    font-family: var(--bs-font-monospace);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.run-live-value-sm {
    font-size: 0.875rem;
}

.run-live-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.run-live-meta-label {
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
}

.run-detail-section-scroll {
    padding-top: 0;
}

.run-detail-section-controls {
    margin: 0 -1rem 0.75rem;
    padding: 1rem 1rem 0.75rem;
}

.run-detail-table-scroll .run-detail-sticky-table,
.run-detail-list-table-scroll .run-detail-sticky-table {
    min-width: 100%;
}

.run-detail-sticky-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--app-table-head-bg);
    box-shadow: inset 0 -1px 0 var(--app-table-head-border);
}

.run-detail-list-empty {
    padding: 1rem 0 0;
}

.run-detail-refresh-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
}

.run-detail-refresh-switch .form-check-input {
    margin: 0;
}

.run-detail-refresh-switch .form-check-label {
    margin: 0;
    font-size: 0.875rem;
    color: var(--app-muted);
    cursor: pointer;
    white-space: nowrap;
}

.run-detail-list-pagination {
    margin: 1rem 1rem 0;
    padding: 0 0 1rem;
    max-width: 100%;
}

.run-detail-list-pagination-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.25rem;
}

.run-detail-list-pagination .pagination {
    width: max-content;
    min-width: 100%;
}

.run-detail-summary-card {
    width: 100%;
}

.run-detail-summary-card .card-body {
    height: 100%;
}

/* ---------- Table column widths (logs) ---------- */
.col-time   { width: 120px; }
.col-level  { width: 90px; }
.col-object { width: 220px; }
.col-object-type { width: 180px; }
.col-source { width: 240px; }

/* ---------- Table column widths (transferring) ---------- */
.col-progress { width: 220px; }
.col-transfer-file { width: 320px; }
.col-transfer-eta { width: 110px; }
.col-transfer-speed { width: 130px; }
.col-transfer-size { width: 110px; }
.col-transfer-route { width: 360px; }

.run-detail-transferring-table {
    table-layout: fixed;
}

.run-detail-transferring-table td[data-scrollable-cell],
.run-detail-transferring-table th[data-scrollable-cell] {
    max-width: 0;
}

/* ---------- Dashboard summary cards ---------- */
.dashboard-summary-box {
    border-color: var(--app-border);
    background: var(--app-surface, var(--bs-body-bg));
}

.dashboard-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
}

.dashboard-allowance-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 28%, var(--app-border));
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--bs-primary) 8%, transparent);
}

.dashboard-allowance-action-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.dashboard-readiness-monitor {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1020;
    width: min(25rem, calc(100vw - 2rem));
    transition: transform 180ms ease;
}

.dashboard-readiness-monitor.is-collapsed {
    transform: translateX(calc(100% - 2.65rem));
}

.dashboard-readiness-panel {
    max-height: min(42rem, calc(100vh - 2rem));
    overflow: auto;
    padding: 0.85rem;
    border: 1px solid var(--app-border);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--app-surface, var(--bs-body-bg)) 96%, transparent);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    transition: opacity 180ms ease, visibility 180ms ease;
}

.dashboard-readiness-monitor.is-collapsed .dashboard-readiness-panel {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.dashboard-readiness-restore {
    position: absolute;
    left: 0;
    bottom: 0.85rem;
    display: none;
    width: 2.25rem;
    min-height: 8.5rem;
    padding: 0.55rem 0.35rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.28);
}

.dashboard-readiness-monitor.is-collapsed .dashboard-readiness-restore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dashboard-readiness-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.dashboard-readiness-eyebrow {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-readiness-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.dashboard-readiness-hide {
    flex: 0 0 auto;
    padding: 0;
    font-size: 0.8125rem;
    text-decoration: none;
}

.dashboard-readiness-progress {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid color-mix(in srgb, var(--bs-success) 24%, var(--app-border));
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--bs-success) 9%, transparent);
    font-size: 0.875rem;
}

.dashboard-readiness-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-readiness-item {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: flex-start;
}

.dashboard-readiness-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--bs-secondary-color);
    background: var(--bs-body-bg);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.dashboard-readiness-item.is-complete .dashboard-readiness-check {
    border-color: color-mix(in srgb, var(--bs-success) 70%, var(--app-border));
    color: var(--bs-white);
    background: var(--bs-success);
}

.dashboard-readiness-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.dashboard-readiness-step-title {
    font-weight: 700;
}

.dashboard-readiness-step-description {
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
    line-height: 1.35;
}

.dashboard-readiness-link,
.dashboard-readiness-guide-link {
    width: fit-content;
    font-size: 0.8125rem;
}

.dashboard-readiness-step-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.1rem;
}

.dashboard-readiness-action {
    --bs-btn-padding-y: 0.12rem;
    --bs-btn-padding-x: 0.45rem;
    --bs-btn-font-size: 0.75rem;
    width: fit-content;
}

.dashboard-readiness-guide-link {
    display: inline-flex;
    margin-top: 0.8rem;
}

@media (max-width: 575.98px) {
    .dashboard-readiness-monitor {
        right: 0.75rem;
        bottom: 0.75rem;
        width: calc(100vw - 1.5rem);
    }

    .dashboard-readiness-monitor.is-collapsed {
        transform: translateX(calc(100% - 2.5rem));
    }
}

.allowance-gauge-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.allowance-gauge {
    --allowance-percent: 0%;
    --allowance-fill: var(--bs-info);
    --allowance-track: color-mix(in srgb, var(--allowance-fill) 18%, transparent);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background:
        conic-gradient(
            var(--allowance-fill) 0 var(--allowance-percent),
            var(--allowance-track) var(--allowance-percent) 100%
        );
}

.allowance-gauge::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: var(--bs-body-bg);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-border) 75%, transparent);
}

.allowance-gauge-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    text-align: center;
}

.allowance-gauge-value {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1;
    color: var(--app-shell-fg);
}

.allowance-gauge-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.dashboard-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
}

.graph-detail-action-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* ---------- Unified data table styling ---------- */

.table.data-table {
    margin-bottom: 0;
    color: var(--app-shell-fg);
}

.table.data-table thead th {
    border-bottom: 1px solid var(--app-table-head-border);
    background: var(--app-table-head-bg);
    color: var(--app-table-head-fg);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap;
}

.table.data-table tbody tr {
    border-color: var(--app-border);
}

.table.data-table tbody tr:hover {
    background: var(--app-row-hover-bg);
}

.table.data-table td,
.table.data-table th {
    border-color: var(--app-border);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    vertical-align: middle;
}

.table.data-table .table-sort {
    color: inherit;
    font-weight: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.table.data-table .table-sort:hover,
.table.data-table .table-sort:focus {
    color: var(--app-link-hover);
}

.table.data-table .badge {
    border: 1px solid var(--app-badge-border);
}

.job-list-badge-stack {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

@media (max-width: 575.98px) {
    .allowance-gauge-wrapper {
        justify-content: center;
    }
}

.job-list-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
}

.job-list-progress {
    display: block;
    min-width: 11rem;
}

.data-table td[data-scrollable-cell],
.data-table th[data-scrollable-cell] {
    max-width: 0;
}

.table-cell-scroll {
    display: block;
    max-width: min(28rem, 45vw);
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
    padding-bottom: 0.125rem;
}

.table-cell-scroll--wide {
    max-width: min(36rem, 60vw);
}

.table-cell-scroll code,
.table-cell-scroll small,
.table-cell-scroll span {
    white-space: inherit;
}

.scan-summary-scrollbox {
    max-height: 12rem;
    overflow-y: auto;
    scrollbar-width: thin;
}

.migration-filter-list {
    max-height: 6rem;
    overflow-y: auto;
    scrollbar-width: thin;
}

.migration-proposed-job-table .migration-scope-cell {
    min-width: 16rem;
    max-width: 24rem;
}

.table-cell-scroll .migration-scope-scroll {
    display: block;
    max-height: 7rem;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: anywhere;
    white-space: normal;
    scrollbar-width: thin;
}

.migration-proposed-job-card.migration-drop-target,
.migration-proposed-job-row.migration-drop-target {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.migration-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    cursor: grab;
}

.migration-drag-handle:active {
    cursor: grabbing;
}

.scan-sanitization-table {
    min-width: 1180px;
    table-layout: fixed;
}

.scan-sanitization-col-select {
    width: 72px;
    min-width: 72px;
    white-space: nowrap;
}

.scan-sanitization-col-kind {
    width: 96px;
    min-width: 96px;
    white-space: nowrap;
}

.scan-sanitization-col-path {
    width: 34%;
    min-width: 320px;
}

.scan-sanitization-col-current,
.scan-sanitization-col-rename {
    width: 18rem;
    min-width: 18rem;
}

.scan-sanitization-col-rename .scan-issue-proposed-rename-input {
    width: 100%;
    min-width: 0;
}

.worker-copy-button {
    min-width: 2rem;
    line-height: 1;
}

.worker-copy-button.is-copied {
    border-color: var(--bs-success);
    color: var(--bs-success);
}

@media (max-width: 991.98px) {
    body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }
    .app-shell {
        display: block !important;
        height: auto !important;
        min-height: 100vh;
    }
    .content-area {
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
    }
    .content-shell {
        padding: 1rem;
    }
    .page-header {
        margin-bottom: 0.75rem;
    }
    .page-action-box {
        width: 100%;
        justify-content: space-between;
    }
    .page-action-box-group {
        width: 100%;
        justify-content: flex-end;
    }
    .sidebar-job-name {
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    h1, h2 {
        font-size: 1.4rem;
    }
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .mobile-list-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    .mobile-list-main {
        min-width: 0;
    }
    .page-action-box {
        padding: 0.75rem;
    }
    .page-action-box-group {
        justify-content: stretch;
    }
    .page-action-box-group > .btn,
    .page-action-box-group > a,
    .page-action-box-group > .btn-group {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 130px;
    }
    .page-action-box-group > .btn-group > .btn {
        width: 100%;
    }
    .mobile-list-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start !important;
        width: 100%;
    }
    .mobile-list-actions > .btn,
    .mobile-list-actions > .btn-group,
    .mobile-list-actions form,
    .mobile-list-actions > a {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 130px;
    }
    .mobile-list-actions .btn,
    .mobile-list-actions .btn-group > .btn {
        width: 100%;
    }
    .mobile-list-item small {
        font-size: 0.8rem;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }
    .btn-group.flex-wrap {
        display: flex !important;
        width: 100%;
        gap: 0.5rem;
    }
    .btn-group.flex-wrap > .btn {
        flex: 1 1 auto;
    }
}
