/* V4 operation pages: dashboard, full-width queue and dedicated attendance record. */

.bni-v4 .content-wrapper {
    max-width: 1960px;
}

.v4-workspace,
.v4-attendance,
.v4-dashboard {
    padding: 12px 4px 38px;
}

/* Full-width operational queue */
.v4-workspace-header {
    align-items: center;
    min-height: 82px;
    margin-bottom: 9px;
    padding: 14px 18px;
    border: 1px solid rgba(24, 42, 59, .07);
    border-radius: 18px;
    background: var(--v4-surface);
    box-shadow: var(--v4-shadow-sm);
}

.v4-workspace-header h1 {
    font-size: clamp(27px, 2vw, 35px);
}

.v4-workspace-header p {
    max-width: 700px;
    font-size: 13px;
    line-height: 1.55;
}

.v4-metrics {
    gap: 8px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.v4-metric {
    min-height: 70px;
    padding: 10px 16px;
    border: 1px solid rgba(24, 42, 59, .07) !important;
    border-radius: 15px;
    background: var(--v4-surface);
    box-shadow: var(--v4-shadow-sm);
}

.v4-metric::before {
    top: 19px;
    bottom: 19px;
    width: 4px;
    border-radius: 0 5px 5px 0;
}

.v4-metric span {
    font-size: 10px;
}

.v4-metric strong {
    margin-top: 2px;
    font-size: 23px;
}

.v4-source-overview {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 18px;
    margin-bottom: 9px;
    padding: 8px 12px;
    overflow: hidden;
    border: 1px solid rgba(24, 42, 59, .07);
    border-radius: 15px;
    background: var(--v4-surface);
    box-shadow: var(--v4-shadow-sm);
}

.v4-source-overview-heading {
    display: flex;
    min-width: 172px;
    align-items: center;
    gap: 10px;
}

.v4-source-overview-heading h2 {
    margin: 1px 0 0;
    font-size: 14px;
    font-weight: 740;
}

.v4-source-overview-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
}

.v4-source-overview-icon svg {
    width: 17px;
    height: 17px;
}

.v4-source-distribution {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    gap: 7px;
    overflow-x: auto;
    padding: 2px 2px 4px;
    scrollbar-width: thin;
}

.v4-source-chip {
    display: inline-flex;
    min-height: 36px;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    padding: 6px 8px 6px 12px;
    border: 1px solid var(--v4-line);
    border-radius: 10px;
    background: var(--v4-paper);
    color: var(--v4-ink);
    font-size: 11px;
    font-weight: 680;
}

.v4-source-chip strong {
    display: inline-flex;
    min-width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #fff;
    color: var(--v4-brand);
    font-size: 11px;
}

.v4-source-chip:hover,
.v4-source-chip:focus-visible,
.v4-source-chip.is-active {
    border-color: var(--v4-brand);
    background: var(--v4-brand-soft);
}

.v4-source-chip.is-origin:not(.is-active) {
    border-style: dashed;
}

.v4-source-empty {
    color: var(--v4-muted);
    font-size: 11px;
}

.v4-workspace-toolbar {
    min-height: 54px;
    grid-template-columns: minmax(260px, 1fr) auto auto auto auto;
    gap: 10px;
    margin-bottom: 9px;
    padding: 8px;
    border-radius: 15px;
}

.v4-workspace-toolbar .form-control,
.v4-workspace-toolbar .form-select {
    min-height: 44px;
}

.v4-workspace-body {
    display: block;
}

.v4-queue-panel,
.v4-board-panel {
    border-radius: 17px;
}

.v4-panel-heading {
    min-height: 56px;
    padding: 10px 16px;
}

.v4-panel-heading h2 {
    font-size: 20px;
}

.v4-board-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--v4-muted);
    font-size: 11px;
    font-weight: 650;
}

.v4-board-scroll-controls {
    display: inline-flex;
    gap: 4px;
}

.v4-board-scroll-controls button {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--v4-line);
    border-radius: 9px;
    background: #fff;
    color: var(--v4-brand);
}

.v4-board-scroll-controls button:hover:not(:disabled),
.v4-board-scroll-controls button:focus-visible:not(:disabled) {
    border-color: var(--v4-brand);
    background: var(--v4-brand-soft);
}

.v4-board-scroll-controls button:disabled {
    cursor: default;
    opacity: .34;
}

.v4-board-scroll-controls svg {
    width: 16px;
    height: 16px;
}

.v4-queue-list {
    max-height: none;
    min-height: 0;
    overflow: visible;
}

.v4-queue-item {
    position: relative;
}

.v4-queue-item:has(.v4-queue-status-action) .v4-entry-card {
    padding-right: 74px;
}

.v4-queue-status-action {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 17px;
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--v4-line);
    border-radius: 10px;
    background: #fff;
    color: var(--v4-muted);
    transform: translateY(-50%);
}

.v4-queue-status-action:hover,
.v4-queue-status-action:focus-visible {
    border-color: var(--v4-orange);
    background: var(--v4-orange-soft);
    color: var(--v4-orange);
}

.v4-queue-status-action.is-restore {
    color: var(--v4-blue);
}

.v4-queue-status-action svg {
    width: 16px;
    height: 16px;
}

.v4-entry-card {
    min-height: 92px;
    grid-template-columns: minmax(0, 1fr) minmax(150px, .25fr) 18px;
    gap: 22px;
    padding: 15px 22px 15px 26px;
    text-decoration: none;
}

.v4-entry-card:hover {
    background: var(--v4-surface-soft);
    color: var(--v4-ink);
}

.v4-entry-main {
    gap: 14px;
}

.v4-entry-copy strong {
    font-size: 14px;
}

.v4-entry-copy span,
.v4-entry-meta {
    font-size: 11px;
}

.v4-entry-meta {
    padding-right: 22px;
}

.v4-entry-arrow {
    width: 17px;
    height: 17px;
    color: var(--v4-muted);
    transition: color .16s ease, transform .16s ease;
}

.v4-entry-card:hover .v4-entry-arrow,
.v4-entry-card:focus-visible .v4-entry-arrow {
    color: var(--v4-brand);
    transform: translateX(3px);
}

.v4-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 11px;
}

.v4-board {
    max-height: none;
    min-height: clamp(350px, calc(100vh - 430px), 590px);
    grid-auto-columns: minmax(270px, 1fr);
    gap: 12px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 10px;
    scroll-behavior: smooth;
    scroll-padding-inline: 10px;
    scroll-snap-type: x proximity;
    scrollbar-gutter: stable;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
}

.v4-board-column {
    min-height: clamp(330px, calc(100vh - 460px), 560px);
    border-radius: 14px;
    scroll-snap-align: start;
}

.v4-board-column-header {
    min-height: 58px;
    padding: 13px 14px;
}

.v4-board-column-header h3 {
    font-size: 11px;
}

.v4-board-cards {
    gap: 10px;
    padding: 11px;
}

.v4-board-card {
    gap: 9px;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
}

.v4-board-card-link {
    display: grid;
    gap: 8px;
    color: var(--v4-ink) !important;
    text-decoration: none;
}

.v4-board-card-origins {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.v4-board-card-origin {
    width: fit-content;
    padding: 4px 7px;
    border-radius: 7px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand) !important;
    font-size: 8px !important;
    font-weight: 700;
}

.v4-entry-origin-text {
    color: var(--v4-brand) !important;
    font-weight: 700;
}

.v4-board-card-link > span:not(.v4-board-card-top, .v4-board-card-origins) {
    color: var(--v4-muted);
    font-size: 10px;
}

.v4-card-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(32px, 1fr));
    gap: 5px;
    padding-top: 9px;
    border-top: 1px solid var(--v4-line);
}

.v4-card-action.is-archive {
    color: var(--v4-muted) !important;
}

.v4-card-action.is-archive:hover,
.v4-card-action.is-archive:focus-visible {
    border-color: var(--v4-orange);
    background: var(--v4-orange-soft);
    color: var(--v4-orange) !important;
}

.v4-card-action.is-restore {
    color: var(--v4-blue) !important;
}

.v4-card-action {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--v4-line);
    border-radius: 8px;
    background: #fff;
    color: var(--v4-brand) !important;
}

.v4-card-action:hover,
.v4-card-action:focus-visible {
    border-color: var(--v4-brand);
    background: var(--v4-brand-soft);
}

.v4-card-action.is-disabled {
    cursor: not-allowed;
    opacity: .36;
}

.v4-card-action svg {
    width: 15px;
    height: 15px;
}

.v4-board-card-top strong {
    font-size: 12px;
}

.v4-board-card > span:not(.v4-board-card-top),
.v4-board-card time,
.v4-board-column-empty {
    font-size: 10px;
}

.v4-workspace-body.is-full-width {
    grid-template-columns: minmax(0, 1fr);
}

.v4-stage-filter {
    min-width: 165px;
}

.v4-origin-filter {
    min-width: 205px;
}

/* Restored V4 dashboard */
.v4-dashboard-header {
    position: relative;
    display: flex;
    min-height: 168px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    overflow: hidden;
    margin-bottom: 14px;
    padding: 30px 32px;
    border-radius: 20px;
    background: var(--v4-forest-950);
    box-shadow: 0 18px 42px rgba(24, 42, 59, .2);
}

.v4-dashboard-header .v4-eyebrow {
    color: var(--v4-brand-on-dark);
}

.v4-dashboard-heading h1 {
    max-width: 720px;
    margin: 5px 0 7px;
    color: #fff;
    font-size: clamp(30px, 3vw, 46px);
    font-weight: 730;
    letter-spacing: -.05em;
}

.v4-dashboard-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--v4-brand-on-dark);
    font-size: 12px;
    line-height: 1.6;
}

.v4-dashboard-header-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.v4-dashboard-header .btn-primary {
    border-color: var(--v4-brand-on-dark) !important;
    background: var(--v4-brand-on-dark) !important;
    color: var(--v4-forest-950) !important;
}

.v4-dashboard-header .btn-outline-primary {
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .07);
    color: #fff !important;
}

.v4-dashboard-header .btn-outline-primary:hover,
.v4-dashboard-header .btn-outline-primary:focus {
    border-color: rgba(255, 255, 255, .58);
    background: rgba(255, 255, 255, .13) !important;
}

.v4-dashboard-sync {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 9px;
    background: rgba(0, 0, 0, .12);
    color: var(--v4-brand-on-dark);
    font-size: 9px;
    font-weight: 650;
}

.v4-dashboard-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--v4-brand-on-dark);
    box-shadow: 0 0 0 4px rgba(213, 229, 242, .15);
}

.v4-dashboard-sync.is-loading .v4-dashboard-live-dot {
    animation: v4-dashboard-pulse 1.1s ease-in-out infinite;
}

.v4-dashboard-sync.is-partial .v4-dashboard-live-dot {
    background: #e2a286;
}

.v4-dashboard-sync.is-error .v4-dashboard-live-dot {
    background: #ff7d83;
}

@keyframes v4-dashboard-pulse {
    50% { opacity: .38; }
}

.v4-dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.v4-dashboard-kpi {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 126px;
    grid-template-columns: 48px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 13px;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(24, 42, 59, .07);
    border-radius: 17px;
    background: var(--v4-surface);
    color: var(--v4-ink) !important;
    text-decoration: none;
    box-shadow: var(--v4-shadow-sm);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.v4-dashboard-kpi:hover {
    border-color: var(--v4-line);
    color: var(--v4-ink) !important;
    box-shadow: var(--v4-shadow);
    transform: translateY(-2px);
}

.v4-dashboard-kpi::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: transparent;
    content: "";
}

.v4-dashboard-kpi.is-priority::before {
    background: var(--v4-orange);
}

.v4-dashboard-kpi.is-attention::before {
    background: var(--v4-orange);
}

.v4-dashboard-kpi-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
}

.v4-dashboard-kpi.is-priority .v4-dashboard-kpi-icon {
    background: var(--v4-orange-soft);
    color: var(--v4-orange);
}

.v4-dashboard-kpi.is-attention .v4-dashboard-kpi-icon {
    background: var(--v4-orange-soft);
    color: var(--v4-orange);
}

.v4-dashboard-kpi-icon svg {
    width: 20px;
    height: 20px;
}

.v4-dashboard-kpi-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.v4-dashboard-kpi-copy strong {
    overflow: hidden;
    font-size: clamp(22px, 2vw, 31px);
    font-weight: 730;
    letter-spacing: -.045em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-dashboard-kpi-copy > span {
    font-size: 11px;
    font-weight: 700;
}

.v4-dashboard-kpi-copy small {
    overflow: hidden;
    color: var(--v4-muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-dashboard-kpi-arrow,
.v4-dashboard-row-arrow {
    width: 16px;
    height: 16px;
    color: var(--v4-muted);
}

.v4-dashboard-primary-grid,
.v4-dashboard-secondary-grid {
    display: grid;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 14px;
}

.v4-dashboard-primary-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(330px, .8fr);
}

.v4-dashboard-secondary-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr);
}

.v4-dashboard-panel.card {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border-radius: 17px;
}

.v4-dashboard-panel-header.card-header {
    display: flex;
    min-height: 86px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px 15px;
    border-bottom: 1px solid var(--v4-line);
    background: #fff;
}

.v4-dashboard-panel-header h2 {
    margin: 2px 0 3px;
    font-size: 18px;
    font-weight: 720;
    letter-spacing: -.025em;
}

.v4-dashboard-panel-header p {
    margin: 0;
    color: var(--v4-muted);
    font-size: 9px;
}

.v4-dashboard-panel-header > a {
    flex: 0 0 auto;
    color: var(--v4-brand);
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
}

.v4-dashboard-panel > .card-body {
    padding: 15px 18px 18px;
}

.v4-dashboard-funnel {
    display: grid;
    gap: 8px;
}

.v4-dashboard-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(155px, .55fr) minmax(155px, .52fr);
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--v4-ink) !important;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}

.v4-dashboard-stage:hover {
    border-color: var(--v4-line);
    background: var(--v4-surface-soft);
}

.v4-dashboard-stage-head,
.v4-dashboard-stage-label,
.v4-dashboard-stage-footer {
    display: flex;
    min-width: 0;
    align-items: center;
}

.v4-dashboard-stage-head {
    justify-content: space-between;
    gap: 12px;
}

.v4-dashboard-stage-label {
    gap: 9px;
    font-size: 10px;
    font-weight: 700;
}

.v4-dashboard-stage-label svg {
    width: 16px;
    height: 16px;
    color: var(--v4-brand);
}

.v4-dashboard-stage-head strong {
    font-size: 13px;
}

.v4-dashboard-stage-bar {
    display: block;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--v4-surface-soft);
}

.v4-dashboard-stage-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--v4-brand);
}

.v4-dashboard-stage-footer {
    justify-content: flex-end;
    gap: 12px;
}

.v4-dashboard-stage-footer small {
    color: var(--v4-muted);
    font-size: 8px;
    white-space: nowrap;
}

.v4-dashboard-stage-footer small:last-child {
    color: var(--v4-ink);
    font-weight: 700;
}

.v4-dashboard-priority-list,
.v4-dashboard-closing-list {
    display: grid;
    align-content: start;
    gap: 0;
}

.v4-dashboard-person-row,
.v4-dashboard-closing-row {
    display: grid;
    min-width: 0;
    align-items: center;
    gap: 11px;
    padding: 12px 2px;
    border-bottom: 1px solid var(--v4-line);
    color: var(--v4-ink) !important;
    text-decoration: none;
}

.v4-dashboard-person-row {
    grid-template-columns: 38px minmax(0, 1fr) auto 16px;
}

.v4-dashboard-closing-row {
    grid-template-columns: 46px minmax(0, 1fr) auto 16px;
}

.v4-dashboard-person-row:last-child,
.v4-dashboard-closing-row:last-child {
    border-bottom: 0;
}

.v4-dashboard-person-row:hover,
.v4-dashboard-closing-row:hover {
    color: var(--v4-brand) !important;
}

.v4-dashboard-person-avatar {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
    font-size: 9px;
    font-weight: 750;
}

.v4-dashboard-person-avatar.is-new {
    background: var(--v4-orange-soft);
    color: var(--v4-orange);
}

.v4-dashboard-person-copy,
.v4-dashboard-closing-copy,
.v4-dashboard-person-meta,
.v4-dashboard-closing-meta {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.v4-dashboard-person-copy strong,
.v4-dashboard-person-copy span,
.v4-dashboard-closing-copy strong,
.v4-dashboard-closing-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-dashboard-person-copy strong,
.v4-dashboard-closing-copy strong {
    font-size: 10px;
}

.v4-dashboard-person-copy span,
.v4-dashboard-closing-copy span,
.v4-dashboard-person-meta,
.v4-dashboard-closing-meta {
    color: var(--v4-muted);
    font-size: 8px;
}

.v4-dashboard-person-meta,
.v4-dashboard-closing-meta {
    justify-items: end;
    white-space: nowrap;
}

.v4-dashboard-closing-meta strong {
    color: var(--v4-ink);
    font-size: 9px;
}

.v4-dashboard-status {
    display: inline-flex;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 7px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.v4-dashboard-status.is-new {
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
}

.v4-dashboard-status.is-attention {
    background: var(--v4-red-soft);
    color: var(--v4-red);
}

.v4-dashboard-closing-date {
    display: grid;
    width: 46px;
    height: 49px;
    align-content: center;
    justify-items: center;
    border-radius: 11px;
    background: var(--v4-surface-soft);
}

.v4-dashboard-closing-row.is-overdue .v4-dashboard-closing-date {
    background: var(--v4-red-soft);
    color: var(--v4-red);
}

.v4-dashboard-closing-date strong {
    font-size: 14px;
    line-height: 1;
}

.v4-dashboard-closing-date span {
    margin-top: 3px;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
}

.v4-dashboard-catalog-panel {
    background: var(--v4-forest-950) !important;
}

.v4-dashboard-catalog-panel > .card-body {
    display: flex;
    min-height: 100%;
    align-items: center;
    gap: 18px;
    padding: 24px;
}

.v4-dashboard-catalog-icon {
    display: inline-flex;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    background: var(--v4-brand-on-dark);
    color: var(--v4-forest-950);
}

.v4-dashboard-catalog-copy .v4-eyebrow {
    color: var(--v4-brand-on-dark);
}

.v4-dashboard-catalog-copy h2 {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 5px 0 4px;
    color: #fff;
}

.v4-dashboard-catalog-copy h2 strong {
    font-size: 28px;
    letter-spacing: -.04em;
}

.v4-dashboard-catalog-copy h2 span {
    font-size: 10px;
    font-weight: 650;
}

.v4-dashboard-catalog-copy p {
    margin: 0 0 14px;
    color: var(--v4-brand-on-dark);
    font-size: 9px;
    line-height: 1.5;
}

.v4-dashboard-catalog-panel .btn-outline-primary {
    border-color: rgba(255, 255, 255, .27);
    background: rgba(255, 255, 255, .07);
    color: #fff !important;
}

.v4-dashboard-skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: var(--v4-surface-soft);
}

.v4-dashboard-skeleton::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .72), transparent);
    content: "";
    transform: translateX(-100%);
    animation: v4-dashboard-shimmer 1.25s infinite;
}

.v4-dashboard-skeleton-stage {
    height: 49px;
}

.v4-dashboard-skeleton-row {
    height: 59px;
    margin-bottom: 5px;
}

@keyframes v4-dashboard-shimmer {
    to { transform: translateX(100%); }
}

/* Dedicated attendance record */
.v4-attendance-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 14px;
    color: var(--v4-muted);
    font-size: 11px;
    font-weight: 600;
}

.v4-attendance-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--v4-brand);
    text-decoration: none;
}

.v4-attendance-breadcrumb svg {
    width: 15px;
    height: 15px;
}

.v4-attendance-loading,
.v4-attendance-error {
    display: flex;
    min-height: 380px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 36px;
    border: 1px solid rgba(24, 42, 59, .07);
    border-radius: 18px;
    background: var(--v4-surface);
    box-shadow: var(--v4-shadow-sm);
}

.v4-attendance-loading > div {
    display: grid;
    gap: 3px;
}

.v4-attendance-loading strong {
    font-size: 14px;
}

.v4-attendance-loading span:last-child {
    color: var(--v4-muted);
    font-size: 11px;
}

.v4-attendance-error {
    flex-direction: column;
    text-align: center;
}

.v4-attendance-error h1 {
    margin: 0 0 5px;
    font-size: 22px;
}

.v4-attendance-error p {
    margin: 0;
    color: var(--v4-muted);
    font-size: 12px;
}

.v4-attendance-error-actions {
    display: flex;
    gap: 9px;
    margin-top: 4px;
}

.v4-attendance-hero {
    position: relative;
    display: flex;
    min-height: 150px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    margin-bottom: 14px;
    padding: 26px 28px;
    border: 1px solid rgba(24, 42, 59, .08);
    border-radius: 20px;
    background: var(--v4-surface);
    box-shadow: var(--v4-shadow-sm);
}

.v4-attendance-person {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 18px;
}

.v4-attendance-person > div {
    min-width: 0;
}

.v4-attendance-avatar {
    display: inline-flex;
    width: 68px;
    height: 68px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(40, 77, 112, .1);
    border-radius: 20px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -.03em;
}

.v4-attendance-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.v4-attendance-kind,
.v4-attendance-code {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 7px;
    background: var(--v4-surface-soft);
    color: var(--v4-muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.v4-attendance-kind {
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
}

.v4-attendance-person h1 {
    overflow: hidden;
    margin: 0 0 4px;
    font-size: clamp(27px, 2.6vw, 42px);
    font-weight: 730;
    letter-spacing: -.045em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-attendance-person p {
    overflow: hidden;
    max-width: 760px;
    margin: 0;
    color: var(--v4-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-attendance-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.v4-attendance-action {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid var(--v4-line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--v4-forest-950) !important;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(24, 42, 59, .04);
}

.v4-attendance-action:hover {
    border-color: var(--v4-brand);
    background: var(--v4-brand-soft);
}

.v4-attendance-action.is-primary {
    border-color: var(--v4-forest-950);
    background: var(--v4-forest-950);
    color: #fff !important;
}

.v4-attendance-action.is-disabled {
    cursor: not-allowed;
    opacity: .42;
}

.v4-attendance-action svg {
    width: 16px;
    height: 16px;
}

.v4-attendance-progress {
    margin-bottom: 14px;
    padding: 18px 20px 20px;
    border: 1px solid rgba(24, 42, 59, .07);
    border-radius: 18px;
    background: var(--v4-surface);
    box-shadow: var(--v4-shadow-sm);
}

.v4-attendance-card.v4-attendance-summary {
    margin-bottom: 14px;
    padding: 20px;
    border-color: rgba(40, 77, 112, .13);
    background: var(--v4-surface);
}

.v4-attendance-card.v4-attendance-summary > header {
    align-items: center;
    margin-bottom: 14px;
}

.v4-attendance-progress-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
}

.v4-attendance-progress-heading h2 {
    margin: 2px 0 0;
    font-size: 17px;
}

.v4-attendance-progress-heading > span {
    padding: 6px 9px;
    border-radius: 8px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
    font-size: 10px;
    font-weight: 700;
}

.v4-attendance-stepper {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.v4-attendance-step {
    position: relative;
    display: grid;
    min-height: 70px;
    align-content: center;
    gap: 5px;
    padding: 12px;
    border: 1px solid var(--v4-line);
    border-radius: 11px;
    background: var(--v4-surface-soft);
    color: var(--v4-muted);
    text-align: left;
}

button.v4-attendance-step {
    cursor: pointer;
}

.v4-attendance-step strong {
    font-size: 10px;
}

.v4-attendance-step span {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.v4-attendance-step.is-complete {
    border-color: #b8d5c4;
    background: var(--v4-green-100);
    color: var(--v4-green-700);
}

.v4-attendance-step.is-current {
    border-color: var(--v4-forest-950);
    background: var(--v4-forest-950);
    color: #fff;
    box-shadow: 0 9px 20px rgba(24, 42, 59, .14);
}

.v4-attendance-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.72fr) minmax(320px, .78fr);
    align-items: start;
    gap: 14px;
}

.v4-attendance-primary,
.v4-attendance-side {
    display: grid;
    min-width: 0;
    gap: 14px;
}

.v4-attendance-side {
    position: sticky;
    top: 92px;
}

.v4-attendance-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid rgba(24, 42, 59, .07);
    border-radius: 17px;
    background: var(--v4-surface);
    box-shadow: var(--v4-shadow-sm);
}

.v4-attendance-card > header,
.v4-attendance-properties-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.v4-attendance-card h2 {
    margin: 3px 0 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.v4-attendance-card > header > span,
.v4-attendance-properties-heading > span {
    color: var(--v4-muted);
    font-size: 9px;
    font-weight: 650;
}

.v4-attendance-context-message {
    margin: 0;
    padding: 18px 20px;
    border-left: 4px solid var(--v4-brand);
    border-radius: 0 12px 12px 0;
    background: var(--v4-surface-soft);
    color: var(--v4-ink);
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.v4-attendance-context-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.v4-attendance-context-meta > div,
.v4-attendance-source-meta > div {
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    border: 1px solid var(--v4-line);
    border-radius: 10px;
    background: var(--v4-surface-soft);
}

.v4-attendance-context-meta span,
.v4-attendance-source-meta span {
    color: var(--v4-muted);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.v4-attendance-context-meta strong,
.v4-attendance-source-meta strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-attendance-sources {
    display: grid;
    gap: 10px;
}

.v4-attendance-source {
    padding: 15px;
    border: 1px solid var(--v4-line);
    border-radius: 12px;
    background: var(--v4-surface-soft);
}

.v4-attendance-source-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.v4-attendance-source-head strong {
    font-size: 12px;
}

.v4-attendance-source-head time {
    color: var(--v4-muted);
    font-size: 9px;
}

.v4-attendance-source p {
    margin: 9px 0 0;
    color: var(--v4-muted);
    font-size: 11px;
    line-height: 1.55;
}

.v4-attendance-source-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.v4-attendance-timeline {
    position: relative;
    display: grid;
    gap: 0;
}

.v4-attendance-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 0 0 19px;
}

.v4-attendance-timeline-item:last-child {
    padding-bottom: 0;
}

.v4-attendance-timeline-icon {
    z-index: 1;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
}

.v4-attendance-timeline-item:not(:last-child) .v4-attendance-timeline-icon::after {
    position: absolute;
    top: 34px;
    bottom: 0;
    left: 16px;
    width: 1px;
    background: var(--v4-line);
    content: "";
}

.v4-attendance-timeline-icon svg {
    width: 15px;
    height: 15px;
}

.v4-attendance-timeline-copy {
    min-width: 0;
    padding-top: 1px;
}

.v4-attendance-timeline-copy strong {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
}

.v4-attendance-timeline-copy p {
    margin: 0;
    color: var(--v4-muted);
    font-size: 10px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.v4-attendance-timeline-item time {
    color: var(--v4-muted);
    font-size: 9px;
    white-space: nowrap;
}

.v4-attendance-next > p,
.v4-attendance-note > p {
    margin: 6px 0 14px;
    color: var(--v4-muted);
    font-size: 10px;
    line-height: 1.5;
}

.v4-attendance-next label {
    display: block;
    margin: 0 0 5px;
    color: var(--v4-muted);
    font-size: 9px;
    font-weight: 700;
}

.v4-field-feedback {
    display: block;
    min-height: 16px;
    margin-top: 6px;
    color: var(--v4-muted);
    font-size: 9px;
}

.v4-note-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 9px;
}

.v4-note-footer > span {
    color: var(--v4-muted);
    font-size: 9px;
}

.v4-attendance-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.v4-attendance-fact {
    display: grid;
    min-width: 0;
    min-height: 72px;
    align-content: center;
    gap: 5px;
    padding: 13px 14px;
    border: 1px solid var(--v4-line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .86);
}

.v4-attendance-fact dt,
.v4-attendance-fact dd {
    margin: 0;
}

.v4-attendance-fact dt {
    color: var(--v4-muted);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .025em;
}

.v4-attendance-fact dd {
    overflow-wrap: anywhere;
    color: var(--v4-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}

.v4-attendance-fact.is-priority {
    border-color: rgba(40, 77, 112, .2);
    background: var(--v4-brand-soft);
}

.v4-attendance-fact.is-priority dd {
    color: var(--v4-brand);
    font-size: 15px;
}

.v4-attendance-fact[data-fact="estimated-value"] dd {
    color: var(--v4-forest-950);
    font-size: 17px;
    letter-spacing: -.025em;
}

.v4-attendance-properties-heading > span {
    display: inline-flex;
    min-width: 28px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
}

.v4-attendance-properties-list {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.v4-attendance-property {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--v4-line);
    border-radius: 10px;
    background: var(--v4-surface-soft);
}

.v4-attendance-property-visual {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: var(--v4-surface-soft);
    color: var(--v4-muted);
}

.v4-attendance-property-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v4-attendance-property-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.v4-attendance-property-copy strong,
.v4-attendance-property-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-attendance-property-copy strong {
    font-size: 10px;
}

.v4-attendance-property-copy span {
    color: var(--v4-muted);
    font-size: 8px;
}

.v4-attendance-empty-inline {
    margin: 0 0 12px;
    padding: 12px;
    border: 1px dashed var(--v4-line-strong);
    border-radius: 10px;
    color: var(--v4-muted);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 1199.98px) {
    .v4-dashboard-primary-grid,
    .v4-dashboard-secondary-grid {
        grid-template-columns: minmax(0, 1.5fr) minmax(300px, .82fr);
    }

    .v4-dashboard-stage {
        grid-template-columns: minmax(0, 1fr) minmax(120px, .45fr);
    }

    .v4-dashboard-stage-footer {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .v4-attendance-layout {
        grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr);
    }

    .v4-attendance-stepper {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .v4-workspace-toolbar {
        grid-template-columns: minmax(250px, 1fr) auto auto;
    }

    .v4-stage-filter {
        grid-column: auto;
    }

    .v4-dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .v4-dashboard-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .v4-dashboard-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v4-dashboard-primary-grid,
    .v4-dashboard-secondary-grid {
        grid-template-columns: 1fr;
    }

    .v4-attendance-hero {
        align-items: flex-start;
    }

    .v4-attendance-layout {
        grid-template-columns: 1fr;
    }

    .v4-attendance-side {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v4-attendance-properties {
        grid-column: 1 / -1;
    }

    .v4-attendance-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .v4-workspace,
    .v4-attendance,
    .v4-dashboard {
        padding-right: 0;
        padding-left: 0;
    }

    .v4-workspace-header,
    .v4-attendance-hero,
    .v4-dashboard-header {
        display: grid;
        padding: 18px;
    }

    .v4-workspace-header {
        min-height: auto;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        padding: 16px 18px;
    }

    .v4-workspace-header-actions,
    .v4-attendance-actions,
    .v4-dashboard-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .v4-workspace-header-actions {
        width: auto;
        justify-content: flex-end;
    }

    .v4-dashboard-sync {
        width: 100%;
    }

    .v4-dashboard-header .btn {
        flex: 1 1 135px;
    }

    .v4-attendance-action {
        flex: 1 1 118px;
    }

    .v4-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v4-source-overview {
        display: grid;
        gap: 7px;
        padding: 9px;
    }

    .v4-source-overview-heading {
        min-width: 0;
    }

    .v4-source-overview-heading .v4-source-overview-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .v4-source-overview-heading h2 {
        font-size: 13px;
    }

    .v4-dashboard-kpi {
        min-height: 108px;
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 15px;
    }

    .v4-dashboard-kpi-icon {
        width: 42px;
        height: 42px;
    }

    .v4-dashboard-kpi-arrow {
        display: none;
    }

    .v4-dashboard-panel-header.card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .v4-dashboard-stage {
        grid-template-columns: minmax(0, 1fr) minmax(105px, .4fr);
        gap: 10px;
    }

    .v4-metric {
        min-height: 82px;
        padding: 14px 16px;
    }

    .v4-workspace-toolbar {
        display: flex;
        align-items: stretch;
        flex-direction: column;
    }

    .v4-filter-group,
    .v4-view-toggle {
        display: grid;
        grid-auto-columns: 1fr;
        grid-auto-flow: column;
        overflow-x: auto;
    }

    .v4-entry-card {
        grid-template-columns: minmax(0, 1fr) 18px;
        gap: 8px;
        padding: 14px 18px 14px 20px;
    }

    .v4-entry-meta {
        display: flex;
        grid-column: 1;
        justify-content: space-between;
        gap: 16px;
        padding: 2px 0 0 56px;
    }

    .v4-entry-arrow {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .v4-board {
        grid-auto-columns: minmax(82vw, 1fr);
    }

    .v4-attendance-person {
        align-items: flex-start;
    }

    .v4-attendance-avatar {
        width: 52px;
        height: 52px;
        border-radius: 15px;
        font-size: 14px;
    }

    .v4-attendance-person h1,
    .v4-attendance-person p {
        white-space: normal;
    }

    .v4-attendance-stepper {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .v4-attendance-step {
        min-width: 148px;
        flex: 0 0 148px;
        scroll-snap-align: start;
    }

    .v4-attendance-side {
        grid-template-columns: 1fr;
    }

    .v4-attendance-context-meta,
    .v4-attendance-source-meta {
        grid-template-columns: 1fr;
    }

    .v4-attendance-timeline-item {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .v4-attendance-timeline-item time {
        grid-column: 2;
    }
}

@media (max-width: 479.98px) {
    .v4-dashboard-kpis {
        grid-template-columns: 1fr;
    }

    .v4-dashboard-kpi {
        min-height: 100px;
    }

    .v4-dashboard-stage {
        grid-template-columns: 1fr;
    }

    .v4-dashboard-stage-footer {
        grid-column: auto;
    }

    .v4-dashboard-person-row {
        grid-template-columns: 38px minmax(0, 1fr) 16px;
    }

    .v4-dashboard-closing-row {
        grid-template-columns: 46px minmax(0, 1fr) 16px;
    }

    .v4-dashboard-person-meta,
    .v4-dashboard-closing-meta {
        grid-column: 2;
        grid-row: 2;
        justify-items: start;
    }

    .v4-dashboard-row-arrow {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .v4-dashboard-catalog-panel > .card-body {
        align-items: flex-start;
        flex-direction: column;
    }

    .v4-attendance-person {
        display: grid;
    }

    .v4-attendance-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v4-attendance-progress-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .v4-attendance-card {
        padding: 16px;
    }

    .v4-workspace-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .v4-workspace-header h1 {
        font-size: 25px;
    }

    .v4-workspace-header .btn {
        min-width: 42px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .v4-workspace-header .btn span {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .v4-workspace {
        padding-top: 6px;
    }

    .v4-source-overview {
        display: flex;
        min-height: 52px;
        gap: 8px;
        padding: 7px 8px;
    }

    .v4-source-overview-heading {
        min-width: 104px;
    }

    .v4-source-overview-heading .v4-source-overview-icon,
    .v4-source-overview-heading .v4-eyebrow {
        display: none;
    }

    .v4-source-overview-heading h2 {
        margin: 0;
        font-size: 12px;
    }

    .v4-source-chip {
        min-height: 34px;
        padding: 5px 7px 5px 10px;
        font-size: 10px;
    }

    .v4-workspace-header {
        margin-bottom: 6px;
        padding: 10px 14px;
        border-radius: 15px;
    }

    .v4-workspace-header h1 {
        margin-top: 0;
        font-size: 24px;
    }

    .v4-workspace-header .v4-eyebrow {
        font-size: 9px;
    }

    .v4-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        margin-bottom: 6px;
    }

    .v4-metric {
        min-height: 62px;
        padding: 8px 9px;
        border-radius: 12px;
    }

    .v4-metric::before {
        top: 14px;
        bottom: 14px;
        width: 3px;
    }

    .v4-metric span {
        overflow: hidden;
        font-size: 9px;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .v4-metric strong {
        font-size: 20px;
    }

    .v4-workspace-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-bottom: 7px;
        padding: 7px;
    }

    .v4-workspace-toolbar .v4-search,
    .v4-workspace-toolbar .v4-filter-group,
    .v4-workspace-toolbar .v4-view-toggle {
        grid-column: 1 / -1;
    }

    .v4-workspace-toolbar .v4-stage-filter,
    .v4-workspace-toolbar .v4-origin-filter {
        min-width: 0;
    }

    .v4-workspace-toolbar .form-control,
    .v4-workspace-toolbar .form-select {
        min-height: 40px;
    }
}

.v4-attendance-outcome {
    border-color: rgba(40, 77, 112, .18);
    background: var(--v4-surface);
}

.v4-attendance-outcome-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.v4-attendance-outcome-heading h2 {
    margin: 3px 0 0;
}

.v4-attendance-outcome > p {
    margin: 0 0 14px;
    color: var(--v4-muted);
    font-size: 12px;
    line-height: 1.55;
}

.v4-attendance-outcome > label,
.v4-attendance-status-fields label,
.v4-attendance-status-fields label > span {
    display: block;
    margin-bottom: 6px;
    color: var(--v4-ink);
    font-size: 12px;
    font-weight: 700;
}

.v4-attendance-status {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
}

.v4-priority-marker.is-archived,
.v4-board-card-top .is-archived {
    background: var(--v4-surface-soft);
    color: var(--v4-muted);
}

.v4-attendance-status-fields {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--v4-line);
}

.v4-attendance-status-fields[hidden],
.v4-attendance-status-fields [hidden] {
    display: none !important;
}

.v4-attendance-close-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.v4-attendance-status-fields .form-control,
.v4-attendance-status-fields .form-select {
    min-height: 42px;
    font-size: 13px;
}

.v4-attendance-status-fields textarea.form-control {
    min-height: 84px;
}

.v4-filter[data-v4-filter="archived"] svg {
    width: 13px;
    height: 13px;
}

.v4-quick-status-dialog {
    width: min(470px, calc(100vw - 28px));
    max-width: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(24, 42, 59, .1);
    border-radius: 18px;
    background: #fff;
    color: var(--v4-ink);
    box-shadow: 0 28px 80px rgba(24, 42, 59, .26);
}

.v4-quick-status-dialog::backdrop {
    background: rgba(8, 25, 18, .48);
    backdrop-filter: blur(3px);
}

.v4-quick-status-form {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.v4-quick-status-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
}

.v4-quick-status-heading h2 {
    margin: 2px 0 0;
    font-size: 19px;
    font-weight: 740;
}

.v4-quick-status-close {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--v4-line);
    border-radius: 10px;
    background: #fff;
    color: var(--v4-muted);
}

.v4-quick-status-close svg {
    width: 17px;
    height: 17px;
}

.v4-quick-status-form > p {
    margin: 0;
    color: var(--v4-muted);
    font-size: 13px;
    line-height: 1.55;
}

.v4-quick-status-reason {
    display: grid;
    gap: 6px;
    font-size: 12px;
    font-weight: 680;
}

.v4-quick-status-reason label:not(:first-child) {
    margin-top: 5px;
}

.v4-quick-status-reason label span {
    color: var(--v4-muted);
    font-size: 11px;
    font-weight: 550;
}

.v4-quick-status-reason[hidden] {
    display: none;
}

.v4-quick-status-reason .form-select,
.v4-quick-status-reason textarea {
    font-size: 13px;
}

.v4-quick-status-reason textarea {
    min-height: 92px;
    resize: vertical;
    font-size: 13px;
}

.v4-quick-status-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 2px;
}

.v4-quick-status-actions .btn {
    min-width: 112px;
}

@media (max-width: 479.98px) {
    .v4-quick-status-form {
        padding: 17px;
    }

    .v4-quick-status-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v4-quick-status-actions .btn {
        min-width: 0;
    }

    .v4-attendance-close-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard analytics: period metrics first, current operation second. */
.v4-dashboard-header {
    min-height: 112px;
    margin-bottom: 10px;
    padding: 19px 22px;
    border-radius: 18px;
}

.v4-dashboard-heading h1 {
    margin: 3px 0 4px;
    font-size: clamp(27px, 2.35vw, 37px);
}

.v4-dashboard-heading p {
    font-size: 12px;
}

.v4-dashboard-header-actions {
    max-width: 620px;
    gap: 7px;
}

.v4-dashboard-period,
.v4-dashboard-channel-tabs {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    border-radius: 10px;
}

.v4-dashboard-period {
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(0, 0, 0, .14);
}

.v4-dashboard-period button,
.v4-dashboard-channel-tabs button {
    min-height: 32px;
    padding: 6px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.v4-dashboard-period button {
    color: var(--v4-brand-on-dark);
}

.v4-dashboard-period button:hover,
.v4-dashboard-period button:focus-visible {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.v4-dashboard-period button.is-active {
    background: var(--v4-brand-on-dark);
    color: var(--v4-forest-950);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
}

.v4-dashboard-context {
    display: flex;
    min-height: 32px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 2px 8px;
    color: var(--v4-muted);
    font-size: 11px;
}

.v4-dashboard-context > div {
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.v4-dashboard-context strong {
    color: var(--v4-ink);
    font-size: 13px;
}

.v4-dashboard-scope,
.v4-dashboard-panel-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
    font-size: 10px;
    font-weight: 700;
}

.v4-dashboard-kpis-analytics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 12px;
}

.v4-dashboard-kpis-analytics .v4-dashboard-kpi {
    min-height: 104px;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 12px;
    border-radius: 15px;
}

.v4-dashboard-kpis-analytics .v4-dashboard-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
}

.v4-dashboard-kpis-analytics .v4-dashboard-kpi-icon svg {
    width: 18px;
    height: 18px;
}

.v4-dashboard-kpis-analytics .v4-dashboard-kpi-copy strong {
    font-size: clamp(21px, 1.8vw, 28px);
}

.v4-dashboard-kpis-analytics .v4-dashboard-kpi-copy > span {
    font-size: 11px;
    line-height: 1.25;
}

.v4-dashboard-kpis-analytics .v4-dashboard-kpi-copy small {
    overflow: visible;
    font-size: 10px;
    line-height: 1.3;
    text-overflow: clip;
    white-space: normal;
}

.v4-dashboard-kpis-analytics .v4-dashboard-kpi-arrow {
    position: absolute;
    top: 12px;
    right: 10px;
}

.v4-dashboard-kpi.is-volume .v4-dashboard-kpi-icon {
    background: var(--v4-blue-soft);
    color: var(--v4-blue);
}

.v4-dashboard-kpi.is-contact .v4-dashboard-kpi-icon {
    background: var(--v4-surface-soft);
    color: var(--v4-brand-strong);
}

.v4-dashboard-kpi.is-attendance .v4-dashboard-kpi-icon {
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
}

.v4-dashboard-kpi.is-converted .v4-dashboard-kpi-icon {
    background: var(--v4-green-100);
    color: var(--v4-green-700);
}

.v4-dashboard-kpi.is-closed .v4-dashboard-kpi-icon {
    background: var(--v4-green-100);
    color: var(--v4-green-700);
}

.v4-dashboard-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.68fr) minmax(350px, .82fr);
    align-items: stretch;
    gap: 12px;
    margin-bottom: 12px;
}

.v4-dashboard-analytics-grid .v4-dashboard-panel {
    min-height: 402px;
}

.v4-dashboard-panel-header.card-header {
    min-height: 82px;
    align-items: center;
    padding: 15px 18px 13px;
}

.v4-dashboard-panel-header h2 {
    font-size: 18px;
}

.v4-dashboard-panel-header p,
.v4-dashboard-panel-header > a {
    font-size: 11px;
    line-height: 1.4;
}

.v4-dashboard-daily-panel > .card-body {
    padding: 4px 14px 13px;
}

.v4-dashboard-chart {
    min-height: 268px;
}

.v4-dashboard-chart .apexcharts-canvas {
    margin-inline: auto;
}

.v4-dashboard-chart-summary {
    min-height: 18px;
    padding: 0 8px;
    color: var(--v4-muted);
    font-size: 10px;
}

.v4-dashboard-skeleton-chart {
    height: 248px;
    margin: 10px 3px;
}

.v4-dashboard-channel-header.card-header {
    display: grid;
    align-content: center;
    gap: 10px;
}

.v4-dashboard-channel-tabs {
    width: 100%;
    background: var(--v4-surface-soft);
}

.v4-dashboard-channel-tabs button {
    flex: 1 1 0;
    color: var(--v4-muted);
}

.v4-dashboard-channel-tabs button:hover,
.v4-dashboard-channel-tabs button:focus-visible {
    color: var(--v4-brand);
}

.v4-dashboard-channel-tabs button.is-active {
    background: #fff;
    color: var(--v4-brand);
    box-shadow: var(--v4-shadow-sm);
}

.v4-dashboard-channel-panel > .card-body {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 9px 17px 14px;
}

.v4-dashboard-channel-list {
    display: grid;
    align-content: start;
    gap: 0;
}

.v4-dashboard-channel-row {
    display: grid;
    gap: 5px;
    padding: 9px 1px;
    border-bottom: 1px solid var(--v4-line);
}

.v4-dashboard-channel-row:last-child {
    border-bottom: 0;
}

.v4-dashboard-channel-row-heading,
.v4-dashboard-channel-identity,
.v4-dashboard-channel-detail {
    display: flex;
    min-width: 0;
    align-items: center;
}

.v4-dashboard-channel-row-heading {
    justify-content: space-between;
    gap: 10px;
}

.v4-dashboard-channel-identity {
    gap: 6px;
    overflow: hidden;
}

.v4-dashboard-channel-identity > strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-dashboard-channel-rate {
    flex: 0 0 auto;
    font-size: 13px;
}

.v4-dashboard-channel-inferred {
    flex: 0 0 auto;
    padding: 2px 5px;
    border-radius: 5px;
    background: var(--v4-orange-soft);
    color: var(--v4-orange);
    font-size: 8px;
    font-weight: 750;
    text-transform: uppercase;
}

.v4-dashboard-channel-progress {
    display: block;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--v4-surface-soft);
}

.v4-dashboard-channel-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--v4-brand);
}

.v4-dashboard-channel-detail {
    color: var(--v4-muted);
    font-size: 10px;
}

.v4-dashboard-data-note {
    margin: 0;
    padding: 8px 9px;
    border-radius: 8px;
    background: var(--v4-orange-soft);
    color: #7f3826;
    font-size: 9px;
    line-height: 1.4;
}

.v4-dashboard-funnel-totals {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.v4-dashboard-funnel-totals > span {
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--v4-surface-soft);
    color: var(--v4-muted);
    font-size: 10px;
}

.v4-dashboard-funnel-totals strong {
    color: var(--v4-ink);
}

.v4-dashboard-funnel-totals a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--v4-brand);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.v4-dashboard-funnel-totals svg {
    width: 14px;
    height: 14px;
}

.v4-dashboard-stage-label,
.v4-dashboard-person-copy strong,
.v4-dashboard-closing-copy strong {
    font-size: 12px;
}

.v4-dashboard-stage-footer small,
.v4-dashboard-person-copy span,
.v4-dashboard-closing-copy span,
.v4-dashboard-person-meta,
.v4-dashboard-closing-meta,
.v4-dashboard-catalog-copy p {
    font-size: 10px;
}

.v4-dashboard-status,
.v4-dashboard-closing-date span {
    font-size: 9px;
}

.v4-dashboard-daily-panel {
    --v4-dashboard-chart-secondary: #738394;
}

.v4-dashboard-daily-fallback {
    display: grid;
    gap: 8px;
    padding: 16px 8px;
}

.v4-dashboard-daily-fallback-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px;
    color: var(--v4-muted);
    font-size: 10px;
}

.v4-dashboard-daily-fallback-bars {
    display: grid;
    gap: 3px;
}

.v4-dashboard-daily-fallback-bars i {
    display: block;
    height: 4px;
    border-radius: 999px;
}

.v4-dashboard-daily-fallback-bars .is-contacts {
    background: var(--v4-brand);
}

.v4-dashboard-daily-fallback-bars .is-attendances {
    background: var(--v4-dashboard-chart-secondary);
}

@media (max-width: 1399.98px) {
    .v4-dashboard-kpis-analytics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .v4-dashboard-kpis-analytics .v4-dashboard-kpi {
        min-height: 92px;
    }
}

@media (max-width: 1199.98px) {
    .v4-dashboard-header {
        align-items: flex-start;
    }

    .v4-dashboard-header-actions {
        max-width: 520px;
    }

    .v4-dashboard-analytics-grid {
        grid-template-columns: 1fr;
    }

    .v4-dashboard-channel-panel {
        min-height: 0 !important;
    }
}

@media (max-width: 991.98px) {
    .v4-dashboard-header {
        display: grid;
    }

    .v4-dashboard-header-actions {
        max-width: none;
        justify-content: flex-start;
    }

    .v4-dashboard-primary-grid,
    .v4-dashboard-secondary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .v4-dashboard-header {
        padding: 17px;
    }

    .v4-dashboard-header-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .v4-dashboard-period {
        grid-column: 1 / -1;
        overflow-x: auto;
    }

    .v4-dashboard-sync {
        display: none;
    }

    .v4-dashboard-header-actions .btn {
        justify-content: center;
    }

    .v4-dashboard-context {
        align-items: flex-start;
    }

    .v4-dashboard-context > div {
        display: grid;
        gap: 1px;
    }

    .v4-dashboard-kpis-analytics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v4-dashboard-panel-header.card-header {
        align-items: flex-start;
    }

    .v4-dashboard-funnel-totals {
        justify-content: flex-start;
    }
}

@media (max-width: 479.98px) {
    .v4-dashboard-kpis-analytics {
        grid-template-columns: 1fr;
    }

    .v4-dashboard-kpis-analytics .v4-dashboard-kpi {
        min-height: 84px;
    }

    .v4-dashboard-header-actions {
        grid-template-columns: 1fr;
    }

    .v4-dashboard-header-actions .btn,
    .v4-dashboard-period {
        grid-column: 1;
        width: 100%;
    }

    .v4-dashboard-period button {
        flex: 1 0 auto;
    }

    .v4-dashboard-context {
        display: grid;
    }

    .v4-dashboard-scope {
        width: max-content;
    }

    .v4-dashboard-channel-tabs {
        overflow-x: auto;
    }

    .v4-dashboard-funnel-totals {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .v4-dashboard-funnel-totals a {
        grid-column: 1 / -1;
    }
}

/* Keep the operational controls close to the records they act on. */
.v4-workspace-header-compact,
.v4-properties-page .v4-properties-header {
    min-height: 44px;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.v4-workspace-header-compact h1,
.v4-properties-page .v4-properties-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 720;
    line-height: 1.3;
    letter-spacing: -.035em;
}

.v4-properties-header-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.v4-workspace-header-compact .btn,
.v4-properties-header-actions .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.v4-metrics-compact .v4-metric {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    box-shadow: none;
}

.v4-metrics-compact .v4-metric::before { top: 12px; bottom: 12px; }
.v4-metrics-compact .v4-metric span { font-size: 11px; }
.v4-metrics-compact .v4-metric strong { margin: 0; font-size: 22px; line-height: 1; }
.v4-source-overview-collapsible[hidden] { display: none !important; }
.v4-source-overview-collapsible { display: block; min-height: 0; padding: 0 12px; border-radius: 12px; box-shadow: none; }
.v4-source-overview-summary { min-height: 44px; padding: 11px 0; cursor: pointer; color: var(--v4-ink); font-size: 12px; font-weight: 650; }
.v4-source-overview-summary > span + span { margin-left: 12px; color: var(--v4-muted); font-size: 11px; font-weight: 500; }
.v4-source-overview-collapsible .v4-source-distribution { padding-bottom: 10px; }

.v4-workspace-compact .v4-workspace-toolbar {
    display: flex;
    flex-flow: row wrap;
    gap: 8px;
}

.v4-workspace-compact .v4-workspace-toolbar > * { min-width: 0; margin: 0; }
.v4-workspace-compact .v4-search { flex: 1 1 230px; }
.v4-workspace-compact .v4-filter-group { flex: 0 1 auto; flex-wrap: wrap; }
.v4-workspace-compact .v4-stage-filter { flex: 1 1 150px; }
.v4-workspace-compact .v4-origin-filter { flex: 1 1 190px; }
.v4-workspace-compact .v4-view-toggle { flex: 0 0 auto; width: auto; margin-left: auto; }
.v4-workspace-compact .v4-workspace-toolbar .form-control,
.v4-workspace-compact .v4-workspace-toolbar .form-select { min-height: 44px; width: 100%; }
.v4-workspace-compact .v4-filter,
.v4-workspace-compact .v4-view-toggle button { min-height: 36px; white-space: nowrap; }
.v4-properties-page .v4-property-results-head { min-height: 40px; margin-bottom: 8px; }
.v4-properties-page .v4-property-inspector-empty { min-height: 200px; }
.v4-properties-page .v4-property-inspector-empty > span { width: 36px; height: 36px; margin-bottom: 8px; border-radius: 10px; }
.v4-properties-page .v4-property-workspace > * { min-width: 0; }
.v4-property-filter-disclosure > summary { display: none; }

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .v4-properties-page .v4-property-workspace { grid-template-columns: 245px minmax(0, 1fr) 290px; }
}

@media (max-width: 991.98px) {
    .v4-property-filter-disclosure > summary { display: list-item; min-height: 44px; margin-left: 30px; padding: 12px 14px 12px 0; color: var(--v4-ink); font-size: 13px; font-weight: 650; cursor: pointer; }
    .v4-property-filter-disclosure[open] > summary { border-bottom: 1px solid var(--v4-line); }
    .v4-property-filter-disclosure .card-body { padding-top: 10px; }
}

@media (max-width: 767.98px) {
    .v4-workspace-header-compact h1,
    .v4-properties-page .v4-properties-header h1 { font-size: 22px; }
    .v4-metrics-compact .v4-metric { min-height: 68px; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 8px; }
    .v4-metrics-compact .v4-metric span { max-width: 100%; overflow: visible; white-space: normal; font-size: 10px; line-height: 1.25; }
    .v4-metrics-compact .v4-metric strong { font-size: 20px; }
    .v4-workspace-compact .v4-filter-group { display: flex; flex: 1 1 100%; width: 100%; }
    .v4-workspace-compact .v4-filter { flex: 1 0 auto; }
    .v4-workspace-compact .v4-search { flex-basis: 100%; }
    .v4-workspace-compact .v4-stage-filter,
    .v4-workspace-compact .v4-origin-filter { flex: 1 1 130px; }
    .v4-workspace-compact .v4-view-toggle { margin-left: 0; }
    .v4-properties-page .v4-properties-header { align-items: center; flex-wrap: wrap; }
    .v4-properties-header-actions { gap: 8px; }
    .v4-source-overview-summary > span + span { display: block; margin: 3px 0 0 16px; }

    /* Prevent a second topbar row from covering the start of the page. */
    .bni-v4 .header-navbar .navbar-container { flex-wrap: nowrap; gap: 6px; }
    .bni-v4 .v4-topbar-title { flex: 1 1 auto; margin-left: 0 !important; }
    .bni-v4 .v4-topbar-title strong { max-width: none; font-size: 12px; }
    .bni-v4 .v4-topbar-actions { flex: 0 0 auto; gap: 6px; }
    .bni-v4 .v4-bni-return-action { min-height: 44px; padding: 7px; font-size: 11px; }
    .bni-v4 .v4-bni-return-action svg { width: 16px; height: 16px; }
}
