:root {
    --blue: #1e66eb;
    --blue-dark: #1657cf;
    --navy: #1a2340;
    --text: #384662;
    --muted: #8b95a7;
    --bg: #f1f2f4;
    --surface: #ffffff;
    --surface-soft: #f6f7f9;
    --line: #d7dde6;
    --line-dark: #c6ced9;
    --purple-shift: #8f5878;
    --purple-shift-soft: #a86686;
    --leave-blue: #dff1ff;
    --empty: #ebeef3;
    --font-size-body: 0.96rem;
    --font-size-ui: 0.88rem;
    --font-size-caption: 0.76rem;
    --font-size-overline: 0.72rem;
    --font-size-page-title: clamp(1.9rem, 1.45rem + 1vw, 2.45rem);
    --font-size-hero-title: clamp(1.85rem, 1.4rem + 0.9vw, 2.35rem);
    --font-size-section-title: 1.12rem;
    --font-size-stat: clamp(1.48rem, 1.22rem + 0.65vw, 1.95rem);
    --line-height-body: 1.55;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: "Poppins", sans-serif;
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    color: var(--text);
    background: var(--bg);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
}

.product-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0.85rem 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    border-bottom: 1px solid rgba(215, 221, 230, 0.95);
    box-shadow: 0 0.75rem 1.8rem rgba(23, 39, 70, 0.06);
}

.product-nav-shell {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.product-brand {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    color: var(--navy);
}

.product-brand:hover {
    color: var(--navy);
}

.product-brand-text {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.product-nav-toggle {
    border: 1px solid #d9dee3;
    border-radius: 14px;
    padding: 0.5rem 0.72rem;
    color: var(--navy);
    background: #fff;
    box-shadow: none;
}

.product-nav-toggle i {
    font-size: 1.25rem;
    line-height: 1;
}

.product-navbar-collapse {
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

@media (min-width: 1200px) {
    .product-navbar-collapse {
        display: flex !important;
    }
}

.product-navbar-start,
.product-navbar-end {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.product-navbar-start {
    flex: 1 1 auto;
}

.product-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
    overflow: hidden;
}

.product-link {
    padding: 0.72rem 0.95rem !important;
    border-radius: 14px;
    color: #566a7f !important;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.product-link.active,
.product-link:hover,
.product-link:focus-visible {
    color: #5f54d2 !important;
    background: rgba(115, 103, 240, 0.12);
}

.product-scope-dropdown {
    flex: 0 0 auto;
    margin: 0;
}

.product-scope-trigger {
    min-width: 108px;
    max-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border: 1px solid #d9dee3;
    border-radius: 16px;
    background: #fff;
    color: var(--navy);
    box-shadow: 0 0.55rem 1.2rem rgba(23, 39, 70, 0.05);
}

.product-scope-trigger:hover,
.product-scope-trigger:focus-visible,
.product-scope-trigger.show {
    border-color: #c7d0db;
    background: #fff;
    color: var(--navy);
}

.product-scope-trigger::after {
    margin-left: auto;
}

.product-scope-trigger-value {
    display: block;
    text-align: left;
    color: var(--navy);
    font-size: 0.94rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 11rem;
}

.product-scope-menu {
    min-width: 100%;
    margin-top: 0.55rem;
    padding: 0.55rem;
    border: 1px solid #e7eaf0;
    border-radius: 18px;
    box-shadow: 0 1.2rem 2.5rem rgba(67, 89, 113, 0.16);
}

.product-scope-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #566a7f;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-scope-item:hover,
.product-scope-item:focus-visible,
.product-scope-item.active {
    background: rgba(115, 103, 240, 0.1);
    color: #5f54d2;
}

.product-navbar-end {
    flex: 0 0 auto;
}

.product-icon-link {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #d9dee3;
    border-radius: 14px;
    background: #fff;
    color: #566a7f;
    font-size: 1rem;
    box-shadow: 0 0.55rem 1.2rem rgba(23, 39, 70, 0.05);
}

.product-icon-link:hover,
.product-icon-link:focus-visible {
    color: #5f54d2;
    border-color: #c7d0db;
    background: #fff;
}

.app-main {
    width: 100%;
    max-width: 100%;
    padding: 1rem 1.25rem 1.5rem;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.topbar > * {
    min-width: 0;
}

.eyebrow {
    margin: 0 0 0.2rem;
    color: var(--muted);
    font-size: var(--font-size-overline);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.page-title {
    margin: 0;
    color: var(--navy);
    font-size: var(--font-size-page-title);
    line-height: 1.08;
    font-weight: 750;
    letter-spacing: -0.035em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.topbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.95rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 600;
}

.btn {
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
}

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

.btn-primary:hover,
.btn-dark:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
}

.btn-outline-secondary,
.btn-outline-dark {
    background: var(--surface);
    border-color: var(--line-dark);
    color: var(--navy);
}

.btn-outline-secondary:hover,
.btn-outline-dark:hover {
    background: #eef2f8;
    border-color: var(--line-dark);
    color: var(--navy);
}

.panel-card,
.metric-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.panel-card {
    padding: 1rem;
}

.metric-card {
    padding: 0.95rem 1rem;
}

.summary-card {
    display: grid;
    gap: 0.45rem;
}

.summary-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.summary-card-copy {
    display: grid;
    gap: 0.12rem;
}

.summary-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    font-size: 1.08rem;
}

.summary-icon.is-primary {
    background: rgba(115, 103, 240, 0.14);
    color: #5f54d2;
}

.summary-icon.is-success {
    background: rgba(40, 199, 111, 0.14);
    color: #28a761;
}

.summary-icon.is-warning {
    background: rgba(255, 171, 0, 0.16);
    color: #c88a00;
}

.summary-icon.is-danger {
    background: rgba(234, 84, 85, 0.14);
    color: #d94142;
}

.summary-icon.is-info {
    background: rgba(0, 207, 232, 0.14);
    color: #0b8ea1;
}

.summary-note {
    color: #8592a3;
    font-size: 0.88rem;
    line-height: 1.45;
}

.metric-label,
.helper-copy {
    color: var(--muted);
}

.helper-copy {
    font-size: 0.92rem;
    line-height: 1.55;
}

.metric-value {
    color: var(--navy);
    font-size: 1.85rem;
    font-weight: 750;
    letter-spacing: -0.03em;
}

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

.section-header > * {
    min-width: 0;
}

.table-shell {
    overflow: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}

.table td {
    border-color: var(--line);
    vertical-align: middle;
}

.soft-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #ebf2ff;
    color: var(--blue);
    font-size: 0.74rem;
    font-weight: 700;
}

.avatar-pill {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: #e8edf5;
    color: var(--navy);
    font-size: 0.78rem;
    font-weight: 800;
}

.min-w-0 {
    min-width: 0;
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

.list-row:last-child {
    border-bottom: 0;
}

.page-employees {
    background:
        radial-gradient(circle at top left, rgba(115, 103, 240, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(40, 199, 111, 0.08), transparent 20%),
        #f5f5f9;
}

.page-employees .topbar-pill {
    border-color: #d9dee3;
    color: #566a7f;
}

.employee-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.15rem;
    align-items: start;
}

.employee-directory-card,
.employee-side-card {
    border: 1px solid #d9dee3;
    border-radius: 22px;
    box-shadow: 0 0.375rem 1rem rgba(161, 172, 184, 0.12);
}

.employee-directory-card {
    padding: 1.4rem;
}

.employee-bottom-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
}

.employee-search-shell {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    width: 100%;
    padding: 0.8rem 0.95rem;
    border: 1px solid #d9dee3;
    border-radius: 12px;
    background: #fff;
}

.employee-search-shell i {
    color: #8592a3;
    font-size: 0.95rem;
}

.employee-search-input {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none !important;
}

.employee-search-input:focus {
    border: 0;
}

.employee-primary-button,
.employee-ghost-button,
.employee-clear-button {
    border-radius: 12px;
    font-weight: 700;
}

.employee-primary-button {
    padding: 0.82rem 1.1rem;
    background: #7367f0;
    border-color: #7367f0;
    color: #fff;
    box-shadow: 0 0.3rem 0.85rem rgba(115, 103, 240, 0.34);
}

.employee-primary-button:hover {
    background: #685dd8;
    border-color: #685dd8;
    color: #fff;
}

.employee-ghost-button,
.employee-clear-button {
    border: 1px solid #d9dee3;
    background: #fff;
    color: #566a7f;
}

.employee-ghost-button {
    padding: 0.82rem 1rem;
}

.employee-ghost-button:hover,
.employee-clear-button:hover {
    background: #f5f5f9;
    border-color: #cfd6dd;
    color: #384551;
}

.employee-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.employee-metric-card {
    display: grid;
    gap: 0.2rem;
    padding: 0.95rem 1rem;
    border: 1px solid #ebeef0;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, #fbfbfd 100%);
}

.employee-metric-label {
    color: #8592a3;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.employee-metric-value {
    color: #384551;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}


.employee-selection-inline {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    flex-wrap: wrap;
}

.employee-selection-count {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.65rem 0.95rem;
    border: 1px solid #e7eaf0;
    border-radius: 12px;
    background: #fbfcfe;
    color: #566a7f;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.employee-table-panel {
    border: 1px solid #ebeef0;
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
}

.employee-table-tools {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 1rem 1.1rem;
    border: 0;
    border-bottom: 1px solid #ebeef0;
    background: #fff;
}

.employee-table-tools-head {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
}

.employee-table-primary-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.employee-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
}

.employee-filter-field {
    display: grid;
    gap: 0.45rem;
}

.employee-filter-field span {
    color: #8592a3;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.employee-table-tools-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.employee-table-view-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.employee-column-menu {
    min-width: 14rem;
    padding: 0.85rem 1rem;
    border: 1px solid #e7eaf0;
    border-radius: 16px;
    box-shadow: 0 1rem 2.4rem rgba(67, 89, 113, 0.14);
}

.employee-column-option {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.4rem 0;
    color: #384551;
    font-size: 0.92rem;
    font-weight: 600;
}

.employee-column-option .form-check-input {
    margin-top: 0;
}

.employee-table-shell {
    border: 0;
    border-radius: 0 0 20px 20px;
    box-shadow: none;
}

.employee-table {
    min-width: 980px;
}

.employee-table thead th {
    padding: 1rem 0.9rem;
    background: #fff;
    color: #a1acb8;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #ebeef0;
}

.employee-table tbody td {
    padding: 1.15rem 0.9rem;
    border-color: #ebeef0;
    background: #fff;
}

.employee-table tbody tr:hover td {
    background: #fcfcff;
}

.employee-person-cell {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.employee-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    background: rgba(115, 103, 240, 0.12);
    color: #5f54d2;
    font-size: 1rem;
    font-weight: 700;
}

.employee-person-copy {
    display: grid;
    gap: 0.18rem;
}

.employee-person-copy strong,
.employee-column-copy strong,
.employee-rate-stack strong {
    color: #384551;
    font-weight: 700;
}

.employee-person-subline,
.employee-column-copy span,
.employee-rate-stack span,
.employee-side-item-copy span,
.employee-side-item-meta small {
    color: #8592a3;
}

.employee-person-subline {
    font-size: 0.94rem;
}

.employee-person-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.employee-contact-stack {
    display: grid;
    gap: 0.18rem;
    min-width: 12rem;
}

.employee-contact-stack strong {
    color: #384551;
    font-weight: 600;
    font-size: 0.92rem;
}

.employee-contact-stack span {
    color: #8592a3;
    font-size: 0.84rem;
}

.employee-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: #f5f5f9;
    color: #8592a3;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.employee-role-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    background: rgba(115, 103, 240, 0.14);
    color: #5f54d2;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.35;
}

.employee-column-copy,
.employee-rate-stack {
    display: grid;
    gap: 0.16rem;
}

.employee-column-copy span,
.employee-rate-stack span {
    font-size: 0.8rem;
}

.employee-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.employee-status-pill.is-active {
    background: rgba(40, 199, 111, 0.16);
    color: #1f9d57;
}

.employee-status-pill.is-on-leave {
    background: rgba(255, 171, 0, 0.16);
    color: #b77700;
}

.employee-status-pill.is-inactive {
    background: rgba(168, 170, 174, 0.16);
    color: #6f7c88;
}

.employee-group-row td {
    padding: 0.72rem 0.9rem !important;
    background: #f7f8fc !important;
    border-top: 1px solid #ebeef0;
    border-bottom: 1px solid #ebeef0;
}

.employee-group-label {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    background: rgba(115, 103, 240, 0.1);
    color: #5f54d2;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.employee-row-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.employee-inline-button {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #d9dee3;
    border-radius: 12px;
    background: #fff;
    color: #566a7f;
    box-shadow: 0 0.2rem 0.55rem rgba(161, 172, 184, 0.12);
}

.employee-inline-button:hover,
.employee-inline-button:focus-visible {
    background: #f5f7fb;
    color: #384551;
    border-color: #cfd6e1;
}

.employee-inline-button i {
    font-size: 1rem;
    line-height: 1;
}

.employee-inline-button.is-danger {
    color: #d93012;
    border-color: rgba(217, 48, 18, 0.18);
    background: rgba(255, 62, 29, 0.06);
}

.employee-inline-button.is-danger:hover,
.employee-inline-button.is-danger:focus-visible {
    background: rgba(255, 62, 29, 0.12);
    color: #b4230b;
    border-color: rgba(217, 48, 18, 0.28);
}

.employee-side-card {
    padding: 1.15rem;
}

.employee-side-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.95rem;
}

.employee-side-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: #f5f5f9;
    color: #7367f0;
    font-size: 0.76rem;
    font-weight: 700;
}

.employee-side-list {
    display: grid;
    gap: 0.8rem;
}

.employee-side-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.9rem;
    border: 1px solid #ebeef0;
    border-radius: 16px;
    background: #fff;
}

.employee-side-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(115, 103, 240, 0.12);
    color: #5f54d2;
    font-size: 1rem;
}

.employee-side-item-icon.is-secondary {
    background: rgba(0, 184, 217, 0.14);
    color: #0a8db0;
}

.employee-side-item-copy,
.employee-side-item-meta {
    display: grid;
    gap: 0.14rem;
}

.employee-side-item-meta {
    justify-items: end;
    text-align: right;
}

.employee-editor-dialog {
    margin: 0;
}

.employee-editor-content {
    min-height: 100vh;
    background: linear-gradient(180deg, #f5f7fb 0%, #eef2f7 100%);
}

.employee-editor-form {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
}

.employee-editor-header,
.employee-editor-footer {
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
}

.employee-editor-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(217, 222, 227, 0.8);
}

.employee-editor-title {
    color: #384551;
    font-size: 1.65rem;
    font-weight: 700;
}

.employee-editor-header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.employee-editor-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.employee-editor-grid {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.employee-editor-sidebar {
    position: sticky;
    top: 0;
}

.employee-editor-main {
    display: grid;
    gap: 1rem;
}

.employee-editor-panel {
    padding: 1.25rem;
    border: 1px solid #e7eaf0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 1rem 2rem rgba(67, 89, 113, 0.06);
}

.employee-editor-summary-card {
    display: grid;
    gap: 1rem;
}

.employee-editor-identity {
    display: flex;
    align-items: center;
    gap: 0.95rem;
}

.employee-editor-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: inline-grid;
    place-items: center;
    background: rgba(115, 103, 240, 0.14);
    color: #5f54d2;
    font-size: 1.3rem;
    font-weight: 700;
}

.employee-editor-identity-copy {
    display: grid;
    gap: 0.2rem;
}

.employee-editor-identity-copy strong {
    color: #384551;
    font-size: 1.05rem;
    font-weight: 700;
}

.employee-editor-identity-copy span {
    color: #8592a3;
    font-size: 0.9rem;
}

.employee-editor-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.employee-editor-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.employee-editor-stat {
    display: grid;
    gap: 0.2rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    background: #f7f8fc;
    border: 1px solid #eef1f5;
}

.employee-editor-stat span {
    color: #8592a3;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.employee-editor-stat strong {
    color: #384551;
    font-size: 0.98rem;
    font-weight: 700;
}

.employee-editor-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.employee-editor-section-head h5 {
    color: #384551;
    font-size: 1rem;
    font-weight: 700;
}

.employee-editor-panel .form-label {
    color: #566a7f;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.employee-editor-panel .form-control,
.employee-editor-panel .form-select {
    min-height: 48px;
    border: 1px solid #d9dee3;
    border-radius: 14px;
    color: #384551;
    box-shadow: none;
}

.employee-editor-panel textarea.form-control {
    min-height: 140px;
}

.employee-editor-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid rgba(217, 222, 227, 0.8);
}

.employee-bulk-summary {
    display: flex;
    justify-content: flex-start;
}

.employee-bulk-field {
    display: grid;
    gap: 0.55rem;
    height: 100%;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfe;
}

.employee-bulk-toggle {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--navy);
    font-size: 0.88rem;
    font-weight: 800;
}

.page-employees .dt-container .row {
    margin: 0;
}

.page-employees .dt-container .dt-layout-row:last-child {
    padding: 0.95rem 1rem 0;
}

.page-employees .dt-container .dt-length,
.page-employees .dt-container .dt-info,
.page-employees .dt-container .dt-paging {
    color: #8592a3;
    font-size: 0.85rem;
}

.page-employees .dt-container .dt-length select {
    min-width: 86px;
    margin: 0 0.45rem;
    padding: 0.5rem 2rem 0.5rem 0.8rem;
    border: 1px solid #d9dee3;
    border-radius: 10px;
    background: #fff;
    color: #566a7f;
}

.page-employees .dt-container .dt-paging .pagination {
    margin: 0;
    gap: 0.35rem;
}

.page-employees .dt-container .page-link {
    min-width: 38px;
    border-radius: 10px;
    border-color: #d9dee3;
    color: #566a7f;
    box-shadow: none;
}

.page-employees .dt-container .page-item.active .page-link {
    background: #7367f0;
    border-color: #7367f0;
    box-shadow: 0 0.22rem 0.6rem rgba(115, 103, 240, 0.28);
}
}

.stat-ribbon {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #eef8f0;
    color: #198754;
    font-size: 0.78rem;
    font-weight: 800;
}

.stat-ribbon.warning {
    background: #fff2de;
    color: #c17b14;
}

.integration-tile {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.workspace-shell {
    display: grid;
    gap: 1rem;
}

.workspace-hero,
.workspace-card {
    border: 1px solid #d9dee3;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 0.375rem 1rem rgba(161, 172, 184, 0.12);
}

.workspace-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem;
    background:
        radial-gradient(circle at top right, rgba(115, 103, 240, 0.14), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #fbfaff 46%, #f3f2ff 100%);
}

.workspace-hero-copy {
    max-width: 760px;
}

.workspace-kicker {
    color: #7367f0;
    font-size: var(--font-size-overline);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.workspace-title {
    margin: 0 0 0.45rem;
    color: #384551;
    font-size: var(--font-size-hero-title);
    line-height: 1.1;
    font-weight: 750;
    letter-spacing: -0.04em;
}

.workspace-copy {
    margin: 0;
    color: #8592a3;
    font-size: 0.95rem;
    line-height: 1.65;
}

.workspace-note {
    min-width: 220px;
    display: grid;
    gap: 0.3rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(115, 103, 240, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.8);
}

.workspace-note strong,
.workspace-stat-value,
.workspace-card-header h3,
.workspace-list-row strong {
    color: #384551;
}

.workspace-note span,
.workspace-stat-card small {
    color: #8592a3;
}

.workspace-note strong {
    font-size: 1.02rem;
    line-height: 1.3;
}

.workspace-note span {
    font-size: 0.9rem;
    line-height: 1.5;
}

.workspace-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.workspace-stat-card {
    display: grid;
    gap: 0.28rem;
    padding: 1rem;
    border: 1px solid #d9dee3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 0.25rem 0.75rem rgba(161, 172, 184, 0.08);
}

.workspace-stat-label {
    color: #8592a3;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.workspace-stat-value {
    font-size: var(--font-size-stat);
    line-height: 1.1;
    font-weight: 750;
}

.workspace-card {
    padding: 1.15rem;
}

.workspace-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.95rem;
}

.workspace-card-header p,
.workspace-muted {
    color: #8592a3;
}

.workspace-card-header h3 {
    font-size: var(--font-size-section-title);
    line-height: 1.25;
    font-weight: 750;
}

.workspace-muted {
    font-size: 0.92rem;
    line-height: 1.55;
}

.workspace-table {
    min-width: 820px;
}

.workspace-table thead th {
    background: #fff;
    color: #a1acb8;
    border-bottom: 1px solid #ebeef0;
}

.workspace-table td {
    border-color: #ebeef0;
}

.workspace-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    background: #f5f5f9;
    color: #566a7f;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.2;
}

.workspace-chip.is-primary {
    background: rgba(115, 103, 240, 0.12);
    color: #5f54d2;
}

.workspace-chip.is-success {
    background: rgba(40, 199, 111, 0.14);
    color: #1f9d57;
}

.workspace-chip.is-warning {
    background: rgba(255, 171, 0, 0.16);
    color: #b77700;
}

.workspace-chip.is-danger {
    background: rgba(255, 62, 29, 0.12);
    color: #d93012;
}

.workspace-list {
    display: grid;
    gap: 0.75rem;
}

.workspace-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid #ebeef0;
    border-radius: 16px;
    background: #fff;
}

.workspace-list-row-copy,
.workspace-list-row-meta {
    display: grid;
    gap: 0.16rem;
}

.workspace-list-row-copy strong {
    font-size: 0.98rem;
    line-height: 1.35;
    font-weight: 700;
}

.workspace-list-row-meta {
    justify-items: end;
    text-align: right;
}

.workspace-split-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 1rem;
}

.workspace-split-grid.is-even {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-dashboard {
    background:
        radial-gradient(circle at top left, rgba(115, 103, 240, 0.1), transparent 20%),
        radial-gradient(circle at top right, rgba(0, 207, 232, 0.08), transparent 18%),
        #f5f5f9;
}

.dashboard-shell {
    gap: 1.15rem;
}

.dashboard-hero {
    align-items: stretch;
}

.dashboard-hero-topline,
.dashboard-hero-chips,
.dashboard-stat-meta,
.dashboard-chart-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.dashboard-hero-topline {
    align-items: center;
    margin-bottom: 0.8rem;
}

.dashboard-hero-chips {
    margin-top: 1rem;
}

.dashboard-hero-panel {
    width: min(360px, 100%);
    display: grid;
    gap: 0.9rem;
}

.dashboard-hero-highlight,
.dashboard-focus-tile,
.dashboard-stat-card {
    border: 1px solid #d9dee3;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0.25rem 0.75rem rgba(161, 172, 184, 0.08);
}

.dashboard-hero-highlight {
    display: grid;
    gap: 0.25rem;
    padding: 1rem 1.1rem;
}

.dashboard-hero-highlight-label,
.dashboard-hero-mini-label,
.dashboard-focus-label {
    color: #8592a3;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dashboard-hero-highlight strong {
    color: #384551;
    font-size: clamp(1.65rem, 1.35rem + 0.55vw, 1.95rem);
    line-height: 1.08;
    font-weight: 750;
    letter-spacing: -0.04em;
}

.dashboard-hero-highlight span:last-child {
    color: #8592a3;
    font-size: 0.91rem;
    line-height: 1.5;
}

.dashboard-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.dashboard-hero-grid > div,
.dashboard-focus-tile {
    display: grid;
    gap: 0.3rem;
    padding: 0.95rem 1rem;
}

.dashboard-hero-grid strong,
.dashboard-focus-tile strong {
    color: #384551;
    font-size: 1.16rem;
    line-height: 1.15;
    font-weight: 750;
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-stat-card {
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
}

.dashboard-stat-card small,
.dashboard-focus-tile p,
.dashboard-cost-row small,
.dashboard-chart-footer-item span {
    color: #8592a3;
}

.dashboard-stat-card .workspace-stat-value {
    font-size: clamp(1.4rem, 1.15rem + 0.45vw, 1.75rem);
}

.dashboard-stat-card small,
.dashboard-focus-tile p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.dashboard-stat-meter {
    width: 100%;
    height: 0.42rem;
    overflow: hidden;
    border-radius: 999px;
    background: #eceff5;
}

.dashboard-stat-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7367f0 0%, #8d84f7 100%);
}

.dashboard-stat-meter.is-success span {
    background: linear-gradient(90deg, #28c76f 0%, #48d68c 100%);
}

.dashboard-stat-meter.is-warning span {
    background: linear-gradient(90deg, #ff9f43 0%, #ffb86d 100%);
}

.dashboard-primary-grid,
.dashboard-secondary-grid,
.dashboard-stream-grid {
    display: grid;
    gap: 1rem;
}

.dashboard-primary-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
}

.dashboard-secondary-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.dashboard-stream-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-chart-card,
.dashboard-focus-card {
    min-width: 0;
}

.dashboard-canvas-lg {
    min-height: 320px;
}

.dashboard-canvas-md {
    min-height: 290px;
}

.dashboard-canvas-sm {
    min-height: 260px;
}

.dashboard-chart-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ebeef0;
}

.dashboard-chart-footer-item {
    display: grid;
    gap: 0.16rem;
    flex: 1 1 180px;
}

.dashboard-chart-footer-item strong,
.dashboard-cost-row strong {
    color: #384551;
    font-size: 0.98rem;
    line-height: 1.3;
}

.dashboard-donut-layout,
.dashboard-cost-list,
.dashboard-focus-grid {
    display: grid;
    gap: 0.9rem;
}

.dashboard-donut-layout {
    grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1fr);
    align-items: center;
}

.dashboard-cost-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #ebeef0;
    border-radius: 14px;
    background: #fff;
}

.dashboard-cost-row-copy strong {
    font-size: 0.95rem;
    line-height: 1.35;
}

.dashboard-cost-row-copy {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.dashboard-dot {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    border-radius: 50%;
}

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

.dashboard-list-row {
    align-items: flex-start;
}

.dashboard-list-row .workspace-list-row-copy,
.dashboard-list-row .workspace-list-row-meta {
    min-width: 0;
}

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

    .dashboard-primary-grid,
    .dashboard-secondary-grid,
    .dashboard-stream-grid,
    .dashboard-donut-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .dashboard-hero {
        flex-direction: column;
    }

    .dashboard-hero-panel {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .dashboard-stat-grid,
    .dashboard-focus-grid,
    .dashboard-hero-grid,
    .dashboard-stream-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-cost-row,
    .dashboard-list-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-list-row .workspace-list-row-meta {
        justify-items: start;
        text-align: left;
    }

    .dashboard-chart-footer {
        flex-direction: column;
    }
}

.page-master-data {
    background:
        radial-gradient(circle at top right, rgba(115, 103, 240, 0.08), transparent 22%),
        #f5f5f9;
}

.master-shell {
    display: grid;
    gap: 1rem;
}

.master-hero,
.master-panel {
    border: 1px solid #d9dee3;
    border-radius: 20px;
    box-shadow: 0 0.375rem 1rem rgba(161, 172, 184, 0.12);
}

.master-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem;
    background:
        radial-gradient(circle at top right, rgba(115, 103, 240, 0.16), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #fbfaff 46%, #f3f2ff 100%);
}

.master-kicker {
    color: #7367f0;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.master-title {
    margin: 0 0 0.55rem;
    color: #384551;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.master-copy {
    max-width: 720px;
    color: #8592a3;
    line-height: 1.7;
}

.master-hero-note {
    min-width: 220px;
    display: grid;
    gap: 0.3rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(115, 103, 240, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
}

.master-hero-note strong,
.master-section-header h3,
.master-stat-value {
    color: #384551;
}

.master-hero-note span,
.master-stat-card small {
    color: #8592a3;
}

.master-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.master-stat-card {
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid #d9dee3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 0.25rem 0.75rem rgba(161, 172, 184, 0.08);
}

.master-stat-label {
    color: #8592a3;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.master-stat-value {
    font-size: 1.7rem;
    font-weight: 700;
}

.master-panel {
    padding: 1.15rem;
    background: #fff;
}

.master-section-header {
    margin-bottom: 0.9rem;
}

.master-table thead th {
    background: #fff;
    color: #a1acb8;
    border-bottom: 1px solid #ebeef0;
}

.master-table td {
    border-color: #ebeef0;
}

.master-action-row {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.master-template-rule-stack,
.master-inline-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.master-template-rule-stack .workspace-chip {
    white-space: nowrap;
}

.master-usage-pill,
.master-colour-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: #f5f5f9;
    color: #566a7f;
    font-size: 0.76rem;
    font-weight: 600;
}

.master-usage-pill + .master-usage-pill {
    margin-left: 0.35rem;
}

.master-colour-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.setup-status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.canvas-wrap {
    min-height: 280px;
    position: relative;
}

.empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--muted);
}

.form-control,
.form-select {
    min-height: 46px;
    padding: 0.68rem 0.95rem;
    border-radius: 12px;
    border: 1px solid #d9dee3;
    background-color: #fff;
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 500;
    box-shadow: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-control:hover,
.form-select:hover {
    border-color: #c7d0db;
}

.form-control::placeholder {
    color: #a1acb8;
}

.form-select {
    padding-right: 2.65rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10' fill='none'%3E%3Cpath d='M2 3L7 8L12 3' stroke='%2369768c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.95rem center;
    background-size: 0.85rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(115, 103, 240, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(115, 103, 240, 0.14);
}

.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    min-height: 46px;
    border: 1px solid #d9dee3 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0.95rem;
    padding-right: 2.4rem;
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 44px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-selection--multiple .select2-search__field::placeholder {
    color: #a1acb8;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 0.8rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #69768c transparent transparent transparent;
    border-width: 6px 5px 0 5px;
    margin-left: -5px;
    margin-top: -2px;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: rgba(115, 103, 240, 0.45) !important;
    box-shadow: 0 0 0 0.2rem rgba(115, 103, 240, 0.14) !important;
}

.select2-container--default .select2-selection--multiple {
    padding: 0.32rem 2.5rem 0.32rem 0.55rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    margin: 0;
    padding: 0.32rem 0.58rem;
    border: 0;
    border-radius: 999px;
    background: rgba(115, 103, 240, 0.12);
    color: #5f54d2;
    font-size: 0.78rem;
    font-weight: 700;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    margin-right: 0.35rem;
    border: 0;
    color: #8b93a6;
}

.select2-dropdown {
    border: 1px solid #e1e6ef !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.select2-search--dropdown {
    padding: 0.75rem;
}

.select2-search--dropdown .select2-search__field {
    min-height: 42px;
    border: 1px solid #d9dee3 !important;
    border-radius: 12px;
    padding: 0.65rem 0.8rem;
}

.select2-results__options {
    padding: 0.4rem;
}

.select2-container--default .select2-results__option {
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    color: var(--navy);
    font-size: 0.92rem;
    font-weight: 600;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--default .select2-results__option--selected {
    background: rgba(115, 103, 240, 0.12) !important;
    color: #5f54d2 !important;
}

.flatpickr-calendar {
    border: 1px solid #e1e6ef;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    font-family: 'Poppins', sans-serif;
}

.flatpickr-months {
    padding: 0.45rem 0.5rem 0;
}

.flatpickr-month {
    color: var(--navy);
}

.flatpickr-current-month {
    padding-top: 0.25rem;
    font-size: 1rem;
    font-weight: 700;
}

.flatpickr-weekdays {
    margin-top: 0.35rem;
}

span.flatpickr-weekday {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.flatpickr-day {
    border-radius: 12px;
    color: var(--navy);
    font-weight: 600;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange {
    background: #7367f0;
    border-color: #7367f0;
    box-shadow: 0 10px 20px rgba(115, 103, 240, 0.22);
}

.flatpickr-day.today {
    border-color: rgba(115, 103, 240, 0.35);
}

.flatpickr-prev-month,
.flatpickr-next-month {
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--navy);
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    background: rgba(115, 103, 240, 0.08);
    color: #5f54d2;
}

.flatpickr-alt-input {
    background-color: #fff !important;
}

.page-rota .app-main {
    padding: 0;
}

.rota-screen {
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
}

.rota-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 0.7rem;
    background: #ececec;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line-dark);
}

.rota-toolbar-left,
.rota-toolbar-centre,
.rota-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.rota-toolbar-centre {
    justify-content: center;
}

.rota-toolbar-right {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.rota-toolbar-right form {
    margin: 0;
}

.rota-selector,
.rota-date-nav,
.rota-icon-button {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.9rem;
    background: #f5f5f5;
    border: 1px solid var(--line-dark);
    border-radius: 6px;
    color: var(--navy);
    font-size: 0.92rem;
    font-weight: 800;
}

.rota-selector-quiet,
.rota-density-toggle {
    gap: 0.45rem;
    background: #f8f9fb;
}

.rota-icon-only {
    width: 36px;
    min-width: 36px;
    padding: 0;
}

.rota-icon-only span {
    display: none;
}

.rota-selector,
.rota-icon-button {
    cursor: pointer;
}

.rota-date-nav {
    min-width: 346px;
    justify-content: space-between;
    gap: 1rem;
}

.rota-date-nav a {
    color: var(--navy);
}

.rota-toggle {
    display: inline-flex;
    padding: 0.15rem;
    background: #f5f5f5;
    border: 1px solid var(--line-dark);
    border-radius: 6px;
}

.rota-toggle a {
    padding: 0.45rem 0.95rem;
    border-radius: 4px;
    color: #505a70;
    font-weight: 800;
}

.rota-toggle a.is-active {
    background: #e0e2e7;
    color: var(--navy);
}

.rota-toggle-soft {
    background: #f8f9fb;
}

.rota-density-toggle {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.9rem;
    border: 1px solid var(--line-dark);
    border-radius: 6px;
    color: var(--navy);
    font-size: 0.92rem;
    font-weight: 800;
}

.rota-density-toggle.is-active {
    background: #e8f0ff;
    border-color: #b9cbee;
    color: var(--blue);
}

.rota-primary-action {
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.9rem;
}

.rota-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.7rem 0.8rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
}

.rota-status-copy {
    display: grid;
    gap: 0.12rem;
}

.rota-status-copy strong {
    color: var(--navy);
    font-size: 0.92rem;
}

.rota-status-copy span {
    color: var(--muted);
    font-size: 0.82rem;
}

.rota-status-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.rota-exception-block {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    min-height: 34px;
    padding: 0.25rem 0.45rem;
    border: 1px solid #f0d8b6;
    border-radius: 4px;
    background: #fff5e8;
    color: #b36b00;
    text-align: center;
}

.rota-exception-block span {
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.15;
}

.rota-exception-block-day_off {
    border-color: #d7dce3;
    background: #eef1f5;
    color: #546173;
}

.rota-exception-block-sick_leave {
    border-color: #f5c6bf;
    background: #fdecea;
    color: #c94b3c;
}

.rota-exception-block-no_show {
    border-color: #f3c3be;
    background: #fff0ef;
    color: #c44536;
}

.rota-exception-block-training {
    border-color: #c8d7ff;
    background: #eff4ff;
    color: #3663d1;
}

.rota-exception-block-unavailable {
    border-color: #e3d5ff;
    background: #f6f1ff;
    color: #7a4fd0;
}

.rota-status-pill,
.rota-inline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.rota-status-pill {
    background: #eef3fb;
    color: #50617a;
}

.rota-status-pill-autopilot {
    background: rgba(115, 103, 240, 0.12);
    color: #7367f0;
}

.rota-status-pill-draft {
    background: rgba(131, 146, 166, 0.14);
    color: #69768c;
}

.rota-inline-badge {
    background: #e7f2ff;
    color: #2d6cb5;
}

.rota-table-wrap {
    overflow-x: auto;
}

.rota-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
}

.rota-table td {
    border-right: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
    vertical-align: top;
}

.rota-sticky {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #f7f7f8;
}

.rota-summary-header,
.rota-summary-metrics,
.rota-day-header,
.rota-person-cell,
.rota-section-row td {
    background: #f7f7f8;
}

.rota-summary-header {
    width: 156px;
    min-width: 156px;
    padding: 0.7rem 0.6rem;
    color: var(--navy);
    font-weight: 800;
}

.rota-summary-title {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rota-day-header {
    width: 134px;
    min-width: 134px;
    padding: 0.25rem 0.6rem 0.45rem;
}

.rota-day-header.is-today {
    box-shadow: inset 0 -2px 0 var(--blue);
}

.rota-day-title {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    color: var(--navy);
}

.rota-day-number {
    color: var(--blue);
    font-size: 1rem;
    font-weight: 800;
}

.rota-summary-metrics {
    padding: 0.45rem 0.55rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--navy);
}

.rota-summary-metrics div + div {
    margin-top: 0.28rem;
}

.rota-person-cell {
    width: 156px;
    min-width: 156px;
    padding: 0.6rem 0.55rem;
}

.rota-person-block {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

.rota-person-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.15rem;
}

.rota-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: #d9dce2;
    color: #505a70;
    font-size: 0.66rem;
    font-weight: 800;
}

.rota-avatar.muted {
    background: #e7e9ee;
}

.rota-section-row td {
    padding: 0.55rem 0.6rem;
    color: var(--navy);
    font-weight: 800;
}

.rota-section-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.rota-section-toggle i {
    font-size: 0.95rem;
    transition: transform 180ms ease;
}

.rota-section-toggle.is-collapsed i {
    transform: rotate(-90deg);
}

.rota-section-toggle span {
    line-height: 1.2;
}

.rota-shift-group-row td {
    padding: 0.4rem 0.6rem;
    background: #eef2f7;
    border-bottom: 1px solid #c8d1de;
}

.rota-shift-group-label {
    color: var(--navy);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rota-shift-group-stats {
    color: #5f6e87;
    font-size: 0.78rem;
    font-weight: 700;
}

.rota-slot {
    position: relative;
    width: 134px;
    min-width: 134px;
    padding: 0.28rem;
    vertical-align: top;
    background: #eef0f4;
}

.rota-empty-filter-state {
    padding: 1rem;
    background: #f5f7fa;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

.rota-slot.is-today {
    box-shadow: inset 0 2px 0 var(--blue);
}

.rota-slot-menu {
    min-width: 198px;
    padding: 0.35rem 0;
}

.rota-slot-menu form {
    margin: 0;
}

.rota-slot-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.84rem;
}

.rota-cell-dropdown,
.rota-card-dropdown {
    display: block;
    margin-bottom: 0.28rem;
}

.rota-cell-surface,
.shift-card {
    width: 100%;
    border: 1px solid #c7ccd5;
    border-radius: 4px;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    box-shadow: none;
    appearance: none;
}

.rota-cell-surface {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
}

.rota-cell-surface.dropdown-toggle::after,
.shift-card-trigger.dropdown-toggle::after {
    display: none;
}

.rota-empty-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 2px dashed #d5dbe5;
    background: rgba(255, 255, 255, 0.35);
    color: #9aa4b4;
}

.rota-empty-slot i {
    font-size: 0.9rem;
    pointer-events: none;
}

.rota-rest-slot {
    border-color: #d8dee7;
    background: #f6f8fb;
    color: #7b8797;
}

.rota-empty-slot:hover {
    border-color: #c1c9d6;
    background: rgba(255, 255, 255, 0.62);
    color: #68768d;
}

.rota-rest-slot:hover {
    border-color: #c7d0db;
    background: #eef2f7;
    color: #647286;
}

.shift-card {
    --shift-colour: var(--purple-shift);
    position: relative;
    display: block;
    margin-bottom: 0;
    padding: 0.4rem 0.6rem 0.42rem 0.6rem;
    cursor: grab;
    min-height: 48px;
}

.shift-card:hover {
    border-color: #b8c1ce;
    background: #fcfdff;
}

.shift-card::before {
    content: "";
    position: absolute;
    left: 0.18rem;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 3px;
    border-radius: 999px;
    background: var(--shift-colour);
}

.shift-card.is-open {
    background: #fff;
}

.shift-card.is-draft {
    background: #eef2f6;
    border-color: #cdd5df;
}

.shift-card.is-draft::before {
    opacity: 0.42;
}

.shift-card.is-draft::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(131, 146, 166, 0.12);
    pointer-events: none;
}

.shift-card.is-draft .shift-card-top,
.shift-card.is-draft .shift-card-meta {
    position: relative;
    z-index: 1;
}

.shift-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    color: var(--navy);
}

.shift-card-top strong {
    font-size: 0.83rem;
    font-weight: 800;
}

.shift-card-flags {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.2rem;
    margin-left: auto;
}

.shift-card-status {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #69768c;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.shift-card-status.is-locked {
    background: rgba(115, 103, 240, 0.12);
    color: #7367f0;
}

.shift-card-meta {
    color: #505a70;
    font-size: 0.78rem;
    line-height: 1.1;
}

.rota-density-short .rota-summary-header,
.rota-density-short .rota-person-cell {
    width: 138px;
    min-width: 138px;
    padding: 0.45rem 0.5rem;
}

.rota-density-short .rota-day-header,
.rota-density-short .rota-slot {
    width: 120px;
    min-width: 120px;
}

.rota-density-short .rota-summary-metrics {
    padding: 0.35rem 0.45rem;
    font-size: 0.8rem;
}

.rota-density-short .rota-person-meta {
    display: block;
}

.rota-density-short .rota-person-meta .helper-copy + .helper-copy,
.rota-density-short .rota-person-meta .helper-copy + .rota-inline-badge {
    margin-left: 0.3rem;
}

.rota-density-short .rota-empty-slot,
.rota-density-short .rota-leave-block,
.rota-density-short .shift-card {
    min-height: 40px;
}

.rota-density-short .shift-card {
    padding: 0.28rem 0.55rem;
}

.rota-density-short .shift-card-top strong {
    font-size: 0.76rem;
}

.rota-density-short .shift-card-meta {
    font-size: 0.71rem;
}

.rota-leave-block {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    min-height: 48px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #cfe6fb;
    border-radius: 4px;
    background: var(--leave-blue);
    color: #2c8de2;
    text-align: center;
}

.rota-leave-block span {
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.15;
}

.rota-leave-block.is-day-off {
    border-color: #c5cad3;
    background-color: #dfe3ea;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.26) 0,
        rgba(255, 255, 255, 0.26) 4px,
        rgba(210, 216, 226, 0.12) 4px,
        rgba(210, 216, 226, 0.12) 12px
    );
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rota-leave-block.is-day-off span {
    font-size: 0.78rem;
    font-weight: 800;
}

.rota-leave-block.is-sick {
    border-color: #f5c6bf;
    background: #fdecea;
    color: #c94b3c;
}

.js-rota-drop-zone.is-drag-over {
    background: #e6edf9;
}

.rota-cell-surface:focus-visible,
.shift-card-trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.18rem rgba(115, 103, 240, 0.18);
}

.shift-card[draggable="true"]:active {
    cursor: grabbing;
}

.month-planner-shell {
    display: grid;
    gap: 1rem;
}

.month-overview-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.month-overview-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: #eef2f7;
    color: #3d4a6b;
    font-size: 0.82rem;
    font-weight: 700;
}

.month-overview-pill.is-warning {
    background: #fff1de;
    color: #c17b14;
}

.month-grid-header,
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-width: 840px;
}

.month-grid-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.month-grid-header div {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e5e9f0;
    color: #8b95a7;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: transparent;
}

.month-day-card {
    min-height: 148px;
    padding: 0.75rem;
    border-right: 1px solid #e5e9f0;
    border-bottom: 1px solid #e5e9f0;
    background: #fff;
}

.month-day-card.is-muted {
    background: #f8f9fc;
}

.month-day-card.is-today {
    background: linear-gradient(180deg, #ffffff 0%, #f5f4ff 100%);
    box-shadow: inset 0 3px 0 #7367f0;
}

.month-day-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.month-day-date-block {
    display: grid;
    gap: 0.08rem;
}

.month-day-date-block strong {
    color: #1a2340;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
}

.month-day-date-block span {
    color: #8b95a7;
    font-size: 0.78rem;
    font-weight: 600;
}

.month-day-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.month-day-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.48rem;
    border-radius: 999px;
    background: #eef2f7;
    color: #566a7f;
    font-size: 0.72rem;
    font-weight: 700;
}

.month-day-pill.is-warning {
    background: #fff1de;
    color: #c17b14;
}

.month-day-list {
    display: grid;
    gap: 0.45rem;
}

.month-shift-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem;
    align-items: start;
    padding: 0.45rem 0.5rem;
    border-radius: 12px;
    background: #f5f7fb;
}

.month-shift-row-time {
    min-width: 2.5rem;
    color: #7367f0;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.35;
}

.month-shift-row-copy {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.month-shift-row-copy strong {
    color: #1a2340;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
}

.month-shift-row-copy span {
    color: #8b95a7;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
}

.month-day-empty {
    min-height: 2rem;
    border-radius: 12px;
    background: linear-gradient(180deg, #fafbfc 0%, #f4f6f9 100%);
}

.month-day-more {
    margin-top: 0.55rem;
    color: #7367f0;
    font-size: 0.75rem;
    font-weight: 700;
}

.leave-screen {
    padding-top: 1rem;
}

.leave-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.leave-toolbar h1 {
    margin: 0;
    color: #4d5668;
    font-size: 2rem;
    font-weight: 800;
}

.leave-toolbar-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.leave-nav-btn,
.leave-tools-btn {
    border: 0;
    background: #b1b5bd;
    color: #fff;
    font-weight: 800;
}

.leave-nav-btn {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    display: grid;
    place-items: center;
}

.leave-range {
    color: #5d6678;
    font-size: 1.05rem;
    font-weight: 800;
}

.leave-tools-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1rem;
    border-radius: 4px;
}

.leave-table-wrap {
    overflow-x: auto;
    background: transparent;
}

.leave-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.leave-table th,
.leave-table td {
    padding: 0.8rem 0.7rem;
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.leave-table th {
    color: #8a909b;
    font-size: 0.8rem;
    font-weight: 800;
}

.leave-table td {
    color: #5d6678;
    font-size: 0.96rem;
}

.leave-employee-col {
    min-width: 220px;
    text-align: left !important;
}

.leave-summary-stat {
    color: #4d5668;
    font-size: 1rem;
    font-weight: 700;
}

.leave-summary-stat.strong {
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
}

.leave-summary-stat.remaining {
    color: #f58220;
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 800;
}

.page-leave .topbar,
.page-rota .topbar {
    display: none;
}

@media (max-width: 1100px) {
    .topbar,
    .employee-directory-hero {
        flex-direction: column;
    }

    .topbar-actions,
    .employee-directory-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .topbar-pill {
        max-width: 100%;
    }

    .employee-shell,
    .setup-status {
        grid-template-columns: 1fr;
    }

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

    .employee-bottom-grid {
        grid-template-columns: 1fr;
    }

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

    .master-hero {
        flex-direction: column;
    }

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

    .workspace-hero,
    .workspace-split-grid,
    .workspace-split-grid.is-even {
        grid-template-columns: 1fr;
    }

    .workspace-hero {
        flex-direction: column;
    }
}

@media (max-width: 1199.98px) {
    .product-nav {
        padding: 0.75rem 0.85rem;
    }

    .product-nav-shell {
        flex-wrap: wrap;
    }

    .product-nav-toggle {
        margin-left: auto;
    }

    .product-navbar-collapse {
        width: 100%;
    }

    .product-navbar-collapse.show,
    .product-navbar-collapse.collapsing {
        display: flex;
        flex-direction: column;
        margin-top: 0.85rem;
        padding-top: 0.85rem;
        border-top: 1px solid rgba(217, 222, 227, 0.9);
        align-items: stretch;
    }

    .product-navbar-start,
    .product-navbar-end,
    .product-links {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .product-navbar-start {
        gap: 0.85rem;
    }

    .product-navbar-end {
        margin-top: 0.35rem;
        justify-content: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .product-scope-dropdown,
    .product-scope-trigger,
    .product-scope-menu {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .leave-toolbar,
    .topbar,
    .rota-toolbar {
        flex-wrap: wrap;
    }

    .product-nav {
        padding: 0.65rem 0.7rem;
    }

    .product-brand {
        margin-right: 0;
    }

    .product-brand-text {
        font-size: 0.98rem;
    }

    .product-scope-trigger {
        min-width: 0;
    }

    .product-scope-trigger-value {
        max-width: 100%;
    }

    .product-link {
        width: 100%;
    }

    .topbar-actions,
    .employee-table-primary-actions,
    .leave-toolbar-controls {
        width: 100%;
    }

    .topbar-pill,
    .employee-table-primary-actions .btn,
    .employee-search-shell,
    .leave-tools-btn {
        width: 100%;
        justify-content: center;
    }

    .employee-search-shell {
        min-width: 0;
    }

    .employee-selection-inline,
    .employee-row-actions,
    .employee-side-header,
    .employee-side-item {
        align-items: stretch;
    }

    .employee-selection-inline,
    .employee-side-header {
        flex-direction: column;
        align-items: stretch;
    }

    .employee-table-view-actions {
        width: 100%;
        justify-content: stretch;
    }

    .employee-selection-inline .btn,
    .employee-selection-count,
    .employee-row-actions .btn,
    .employee-row-actions form {
        width: 100%;
    }

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

    .employee-side-item {
        grid-template-columns: 1fr;
    }

    .employee-side-item-meta {
        justify-items: start;
        text-align: left;
    }

    .employee-directory-card,
    .employee-side-card {
        border-radius: 18px;
    }

    .master-hero,
    .master-panel {
        border-radius: 18px;
    }

    .employee-metric-grid {
        grid-template-columns: 1fr;
    }

    .master-stat-grid {
        grid-template-columns: 1fr;
    }

    .workspace-hero,
    .workspace-card {
        border-radius: 18px;
    }

    .workspace-stat-grid {
        grid-template-columns: 1fr;
    }

    .workspace-list-row,
    .workspace-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .workspace-list-row-meta {
        justify-items: start;
        text-align: left;
    }

    .employee-table {
        min-width: 980px;
    }

    .employee-directory-card {
        padding: 1rem;
    }

    .employee-directory-hero {
        padding: 1rem;
    }

    .employee-directory-title {
        font-size: 1.55rem;
    }

    .employee-selection-inline {
        align-items: stretch;
    }

    .rota-toolbar {
        grid-template-columns: 1fr;
    }

    .rota-toolbar-left,
    .rota-toolbar-centre,
    .rota-toolbar-right {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .rota-toolbar-right form {
        width: 100%;
    }

    .rota-selector,
    .rota-date-nav,
    .rota-density-toggle,
    .rota-primary-action {
        width: 100%;
        min-width: 0;
    }

    .rota-toggle {
        width: 100%;
    }

    .rota-toggle a {
        flex: 1 1 0;
        text-align: center;
    }

    .leave-range {
        width: 100%;
    }

    .app-main {
        padding: 0.8rem;
    }
}

.page-autopilot .app-main {
    padding-bottom: 2rem;
}

.autopilot-shell {
    display: grid;
    gap: 1rem;
}

.autopilot-shell > *,
.autopilot-grid > *,
.autopilot-summary-grid > * {
    min-width: 0;
}

.autopilot-empty-state {
    padding: 2rem;
    text-align: left;
}

.autopilot-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem;
    background:
        radial-gradient(circle at top right, rgba(30, 102, 235, 0.16), transparent 35%),
        linear-gradient(135deg, #ffffff 0%, #f6f9ff 52%, #eef4ff 100%);
}

.autopilot-hero-title {
    margin: 0 0 0.4rem;
    color: var(--navy);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.autopilot-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
    max-width: 100%;
}

.autopilot-hero-actions form {
    margin: 0;
}

.autopilot-hero-actions .btn {
    white-space: normal;
}

.autopilot-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.9rem;
}

.autopilot-banner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    background: linear-gradient(180deg, #fffef9 0%, #fff8ea 100%);
}

.autopilot-recommendations {
    display: grid;
    gap: 0.75rem;
}

.autopilot-note {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #d9e7ff;
    border-radius: 10px;
    background: #f4f8ff;
}

.autopilot-note i {
    color: var(--blue);
    font-size: 1rem;
    margin-top: 0.05rem;
}

.autopilot-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1rem;
}

.autopilot-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.autopilot-form-grid label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--navy);
}

.autopilot-field-label,
.autopilot-checkbox-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.autopilot-form-wide {
    grid-column: 1 / -1;
}

.autopilot-checkbox {
    display: flex !important;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    font-weight: 700;
}

.autopilot-checkbox input {
    margin: 0;
}

.autopilot-help-trigger {
    width: 1.3rem;
    height: 1.3rem;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    line-height: 1;
    flex-shrink: 0;
}

.autopilot-help-trigger:hover,
.autopilot-help-trigger:focus-visible {
    color: var(--blue);
    background: rgba(30, 102, 235, 0.08);
    outline: none;
}

.autopilot-form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
}

.autopilot-subtitle {
    margin: 0 0 0.9rem;
    color: var(--navy);
    font-size: 1rem;
    font-weight: 800;
}

.autopilot-queue {
    display: grid;
    gap: 0.8rem;
}

.autopilot-queue-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfe;
}

.autopilot-queue-copy {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.autopilot-queue-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.autopilot-queue-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.autopilot-chip {
    background: #eef7f1;
    color: #1f7a4f;
}

.autopilot-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.autopilot-stats-list {
    display: grid;
    gap: 0.8rem;
}

.autopilot-stats-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--line);
}

.autopilot-stats-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.autopilot-stats-list span {
    color: var(--muted);
}

.autopilot-stats-list strong {
    color: var(--navy);
}

.autopilot-coverage-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.autopilot-coverage-card {
    padding: 1rem;
}

.autopilot-coverage-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.autopilot-board-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.autopilot-board-chip-new {
    background: #edf4ff;
    color: #205fd6;
}

.autopilot-board-chip-updated {
    background: #fff6df;
    color: #b6761a;
}

.autopilot-board {
    display: grid;
    gap: 1rem;
}

.autopilot-day-column {
    display: grid;
    align-content: start;
    gap: 1rem;
    padding: 1.1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #fcfdff 0%, #f7f9fd 100%);
    box-shadow: 0 16px 32px rgba(23, 39, 70, 0.06);
}

.autopilot-day-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.autopilot-day-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.autopilot-day-date {
    display: block;
    margin-top: 0.2rem;
    color: var(--navy);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.autopilot-day-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.autopilot-day-summary span,
.autopilot-slot-meta span {
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    background: #eef2f8;
    color: var(--navy);
    font-size: 0.76rem;
    font-weight: 700;
}

.autopilot-day-summary span.is-open,
.autopilot-slot-meta span.is-open {
    background: #fff0eb;
    color: #bf4c28;
}

.autopilot-day-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.9rem;
}

.autopilot-day-empty {
    min-height: 120px;
    display: grid;
    place-items: center;
    border: 1px dashed var(--line-dark);
    border-radius: 12px;
    color: var(--muted);
    background: #fbfcfe;
}

.autopilot-slot-card {
    display: grid;
    gap: 0.7rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #d8e0ec;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(23, 39, 70, 0.05);
}

.autopilot-slot-card.is-new {
    border-color: #8cb4ff;
    background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
}

.autopilot-slot-card.is-updated {
    border-color: #ffcc7a;
    background: linear-gradient(180deg, #ffffff 0%, #fff9ef 100%);
}

.autopilot-slot-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.autopilot-slot-top > * {
    min-width: 0;
}

.autopilot-slot-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.autopilot-assignment-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.55rem;
}

.autopilot-assignment-row {
    display: grid;
    gap: 0.12rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: #f6f8fb;
}

.autopilot-assignment-row.is-new {
    background: #edf4ff;
}

.autopilot-assignment-row span {
    color: var(--navy);
    font-size: 0.88rem;
    font-weight: 800;
}

.autopilot-assignment-row small {
    color: var(--muted);
}

.autopilot-open-flag {
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    background: #fff0eb;
    color: #bf4c28;
    font-size: 0.82rem;
    font-weight: 800;
}

.autopilot-lock-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.autopilot-lock-banner.is-locked {
    border-color: #f0c4bb;
    background: linear-gradient(180deg, #fff8f6 0%, #fff1ed 100%);
}

.autopilot-publish-shell {
    overflow: auto;
}

.autopilot-publish-table {
    min-width: 1120px;
}

.autopilot-publish-section .workspace-chip.is-secondary {
    background: #eef2f8;
    color: var(--navy);
}

.autopilot-publish-groups,
.autopilot-publish-group {
    display: grid;
    gap: 0.6rem;
}

.autopilot-publish-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.autopilot-publish-group label {
    display: grid;
    gap: 0.35rem;
}

.autopilot-preferences-shell {
    overflow: auto;
}

.autopilot-preferences-table {
    min-width: 1120px;
    table-layout: fixed;
}

.autopilot-preferences-table td,
.autopilot-preferences-table th {
    vertical-align: top;
}

.autopilot-preferences-head {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.autopilot-employee-cell,
.autopilot-preference-stack,
.autopilot-priority-select {
    display: grid;
    gap: 0.5rem;
}

.autopilot-preference-stack-tight {
    gap: 0.7rem;
}

.autopilot-employee-cell {
    min-width: 10rem;
}

.autopilot-employee-cell strong {
    color: var(--navy);
    font-size: 0.98rem;
}

.autopilot-preferences-table .select2-container {
    width: 100% !important;
}

.autopilot-preferences-table .select2-selection--multiple,
.autopilot-preferences-table .select2-selection--single {
    min-height: 48px;
}

.autopilot-toggle-pill-compact {
    width: fit-content;
    min-height: 2.9rem;
    padding-inline: 0.95rem;
}

.autopilot-toggle-pill-block {
    width: 100%;
    justify-content: flex-start;
}

.autopilot-inline-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.autopilot-preference-flags {
    display: grid;
    gap: 0.55rem;
}

.autopilot-preference-flags .autopilot-toggle-pill {
    width: fit-content;
}

.autopilot-multi-dropdown {
    display: grid;
    gap: 0.45rem;
}

.autopilot-multi-trigger {
    width: 100%;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    text-align: left;
    border-color: var(--line);
    background: #fff;
}

.autopilot-multi-trigger::after {
    margin-left: auto;
    flex: 0 0 auto;
}

.autopilot-multi-trigger .js-autopilot-multi-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    flex: 1 1 auto;
}

.autopilot-multi-placeholder {
    color: var(--muted);
    font-weight: 500;
}

.autopilot-multi-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--navy);
    font-size: 0.77rem;
    font-weight: 600;
    line-height: 1.1;
}

.autopilot-multi-chip-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    background: #6366f1;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
}

.autopilot-multi-chip.is-muted {
    background: #eef1f6;
    color: var(--muted);
}

.autopilot-multi-menu {
    min-width: 18rem;
    max-width: 22rem;
    max-height: 18rem;
    overflow: auto;
    padding: 0.45rem !important;
    border-radius: 16px;
    border: 1px solid var(--line);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.autopilot-multi-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.2rem;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.autopilot-multi-option:hover,
.autopilot-multi-option.is-selected {
    background: #eef2ff;
}

.autopilot-multi-option .js-autopilot-multi-option {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.autopilot-multi-option-indicator {
    width: 1.3rem;
    height: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-dark);
    border-radius: 0.4rem;
    background: #fff;
    color: transparent;
    flex: 0 0 auto;
    transition: all 0.18s ease;
}

.autopilot-multi-option.is-selected .autopilot-multi-option-indicator {
    border-color: #6366f1;
    background: #6366f1;
    color: #fff;
}

.autopilot-multi-option-text {
    min-width: 0;
    line-height: 1.35;
}

.autopilot-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f7f9fd;
    color: var(--navy);
    font-size: 0.86rem;
    font-weight: 600;
}

.autopilot-toggle-pill input {
    margin: 0;
}

.empty-state {
    padding: 1.2rem;
    border: 1px dashed var(--line-dark);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1200px) {
    .autopilot-metrics,
    .autopilot-coverage-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .autopilot-grid,
    .autopilot-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .autopilot-banner {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .autopilot-hero,
    .autopilot-queue-item {
        flex-direction: column;
    }

    .autopilot-hero-actions,
    .autopilot-queue-actions {
        justify-content: flex-start;
        align-items: stretch;
    }

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

    .autopilot-metrics,
    .autopilot-coverage-grid,
    .autopilot-form-grid {
        grid-template-columns: 1fr;
    }

    .autopilot-day-header,
    .autopilot-day-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .autopilot-slot-top,
    .autopilot-coverage-top {
        flex-direction: column;
    }

    .autopilot-day-slot-grid,
    .autopilot-assignment-list {
        grid-template-columns: 1fr;
    }

    .autopilot-demand-shell {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .autopilot-demand-table {
        min-width: 0;
    }

    .autopilot-demand-table thead {
        display: none;
    }

    .autopilot-demand-table tbody {
        display: grid;
        gap: 0.85rem;
    }

    .autopilot-demand-table tr {
        display: grid;
        gap: 0.8rem;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
        box-shadow: 0 10px 24px rgba(23, 39, 70, 0.05);
    }

    .autopilot-demand-table td {
        display: grid;
        gap: 0.25rem;
        padding: 0;
        border: 0;
    }

    .autopilot-demand-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .autopilot-preferences-shell {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .autopilot-preferences-table {
        min-width: 0;
    }

    .autopilot-preferences-table thead {
        display: none;
    }

    .autopilot-preferences-table tbody {
        display: grid;
        gap: 0.85rem;
    }

    .autopilot-preferences-table tr {
        display: grid;
        gap: 0.85rem;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
        box-shadow: 0 10px 24px rgba(23, 39, 70, 0.05);
    }

    .autopilot-preferences-table td {
        display: grid;
        gap: 0.35rem;
        padding: 0;
        border: 0;
    }

    .autopilot-preferences-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .autopilot-lock-banner {
        flex-direction: column;
    }

    .autopilot-publish-shell {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .autopilot-publish-table {
        min-width: 0;
    }

    .autopilot-publish-table thead {
        display: none;
    }

    .autopilot-publish-table tbody {
        display: grid;
        gap: 0.85rem;
    }

    .autopilot-publish-table tr {
        display: grid;
        gap: 0.85rem;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
        box-shadow: 0 10px 24px rgba(23, 39, 70, 0.05);
    }

    .autopilot-publish-table td {
        display: grid;
        gap: 0.35rem;
        padding: 0;
        border: 0;
    }

    .autopilot-publish-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .autopilot-publish-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1199.98px) {
    .employee-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .employee-editor-grid {
        grid-template-columns: 1fr;
    }

    .employee-editor-sidebar {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .employee-editor-header,
    .employee-editor-footer,
    .employee-editor-body {
        padding: 1rem;
    }

    .employee-editor-header,
    .employee-editor-header-actions,
    .employee-editor-footer {
        align-items: stretch;
    }

    .employee-editor-header,
    .employee-editor-footer {
        flex-direction: column;
    }

    .employee-editor-header-actions .employee-meta-pill,
    .employee-editor-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .employee-editor-stat-grid {
        grid-template-columns: 1fr;
    }

    .employee-editor-title {
        font-size: 1.35rem;
    }

    .employee-table-tools,
    .employee-table-tools-head,
    .employee-table-tools-actions {
        align-items: stretch;
    }

    .employee-table-tools-head {
        grid-template-columns: 1fr;
    }

    .employee-filter-grid {
        grid-template-columns: 1fr;
    }

    .employee-table-primary-actions,
    .employee-table-view-actions,
    .employee-table-tools-actions .dropdown,
    .employee-table-tools-actions .btn {
        width: 100%;
    }

    .employee-column-menu {
        min-width: 100%;
    }
}


body.is-planning-overlay-open {
    overflow: hidden;
}

.planning-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 24, 41, 0.58);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.planning-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.planning-overlay__panel {
    width: min(680px, 100%);
    border-radius: 18px;
    border: 1px solid rgba(219, 227, 240, 0.55);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 247, 255, 0.98) 100%);
    box-shadow: 0 28px 72px rgba(16, 24, 40, 0.3);
    padding: 1rem;
    display: grid;
    gap: 0.8rem;
}

.planning-overlay__title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.planning-overlay__pulse {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #5f5cf1;
    box-shadow: 0 0 0 0 rgba(95, 92, 241, 0.5);
    animation: planning-pulse 1.3s ease infinite;
}

.planning-overlay__title {
    font-size: 1.06rem;
    font-weight: 700;
    color: #1b2748;
}

.planning-overlay__message {
    margin: 0;
    font-size: 0.9rem;
    color: #5d6d8b;
}

.planning-overlay__steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.planning-overlay__step {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.68rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #70809f;
    background: rgba(148, 163, 184, 0.16);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.planning-overlay__step.is-active {
    color: #2f3ab6;
    background: rgba(95, 92, 241, 0.2);
    transform: translateY(-1px);
}

.planning-overlay__board {
    display: grid;
    gap: 0.45rem;
}

.planning-overlay__lane {
    position: relative;
    min-height: 38px;
    border: 1px dashed rgba(98, 115, 144, 0.32);
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(239, 243, 252, 0.75) 0%, rgba(245, 248, 255, 0.9) 100%);
}

.planning-overlay__card {
    position: absolute;
    top: 6px;
    width: 108px;
    height: 24px;
    border-radius: 8px;
    border: 1px solid rgba(196, 208, 228, 0.95);
    box-shadow: 0 8px 18px rgba(27, 39, 72, 0.12);
    left: -130px;
    animation-name: planning-card-move;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.planning-overlay__card--a {
    background: linear-gradient(135deg, #eff4ff 0%, #dbe7ff 100%);
    animation-duration: 2.7s;
}

.planning-overlay__card--b {
    background: linear-gradient(135deg, #f7f4ff 0%, #e7dfff 100%);
    animation-duration: 3.2s;
    animation-delay: 0.45s;
}

.planning-overlay__card--c {
    background: linear-gradient(135deg, #ecfbf4 0%, #d3f6e5 100%);
    animation-duration: 3.6s;
    animation-delay: 0.85s;
}

.planning-overlay__lane-1 {
    animation-delay: 0.25s;
}

.planning-overlay__lane-2 {
    animation-delay: 0.6s;
}

@keyframes planning-card-move {
    0% {
        left: -130px;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    100% {
        left: calc(100% + 12px);
        opacity: 0;
    }
}

@keyframes planning-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(95, 92, 241, 0.45);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(95, 92, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(95, 92, 241, 0);
    }
}

@media (max-width: 767.98px) {
    .planning-overlay {
        padding: 0.9rem;
    }

    .planning-overlay__panel {
        padding: 0.85rem;
    }

    .planning-overlay__card {
        width: 88px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .planning-overlay,
    .planning-overlay * {
        animation: none !important;
        transition: none !important;
    }
}
