:root {
    --haven-navy: #20335f;
    --haven-navy-dark: #172747;
    --haven-navy-soft: #eef2f8;

    --haven-bg: #f5f7fb;
    --haven-surface: #ffffff;
    --haven-surface-soft: #f8fafc;

    --haven-text: #1f2937;
    --haven-heading: #172033;
    --haven-muted: #64748b;

    --haven-border: #e2e8f0;
    --haven-border-strong: #cbd5e1;

    --haven-success: #166534;
    --haven-success-bg: #ecfdf5;

    --haven-warning: #9a3412;
    --haven-warning-bg: #fff7ed;

    --haven-danger: #991b1b;
    --haven-danger-bg: #fef2f2;

    --haven-radius-sm: 10px;
    --haven-radius-md: 14px;
    --haven-radius-lg: 18px;
    --haven-radius-xl: 22px;

    --haven-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --haven-shadow-md: 0 10px 30px rgba(15, 23, 42, 0.07);
    --haven-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.10);

    --haven-transition: 160ms ease;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--haven-bg);
}

body {
    background: var(--haven-bg);
    color: var(--haven-text);
    font-family:
        "Nunito Sans",
        "Segoe UI",
        Arial,
        sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
    font-family: inherit;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    background:
        linear-gradient(
            180deg,
            var(--haven-navy) 0%,
            var(--haven-navy-dark) 100%
        );
    color: #ffffff;
    box-shadow: 8px 0 35px rgba(15, 23, 42, 0.10);
}

.sidebar-top {
    padding: 18px 14px 12px;
}

.sidebar-brand-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--haven-radius-lg);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(8px);
}

.sidebar-brand-card img {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: contain;
    padding: 5px;
    background: #ffffff;
    border-radius: 13px;
}

.sidebar-brand-copy {
    min-width: 0;
}

.sidebar-brand-copy strong {
    display: block;
    color: #ffffff;
    font-size: 0.97rem;
    line-height: 1.2;
}

.sidebar-brand-copy span {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.72rem;
    line-height: 1.3;
}

.sidebar-nav {
    padding: 4px 10px 18px;
}

.sidebar-section-label {
    margin: 18px 12px 7px;
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    margin: 2px 0;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.91rem;
    font-weight: 650;
    text-decoration: none;
    transition:
        background var(--haven-transition),
        border-color var(--haven-transition),
        color var(--haven-transition),
        transform var(--haven-transition);
}

.sidebar-nav a:hover,
.sidebar-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-nav a.active,
.sidebar-nav a[aria-current="page"] {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--haven-navy);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.12);
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
    line-height: 1;
}

.sidebar-nav a:hover .nav-icon,
.sidebar-nav a:focus-visible .nav-icon {
    background: rgba(255, 255, 255, 0.12);
}

.sidebar-nav a.active .nav-icon,
.sidebar-nav a[aria-current="page"] .nav-icon {
    background: var(--haven-navy-soft);
    color: var(--haven-navy);
}

.sidebar-nav .logout-link {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.66);
}

.sidebar-nav .logout-link:hover {
    color: #ffffff;
}

.sidebar-footer {
    padding: 12px 14px 18px;
}

.sidebar-user-card {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--haven-radius-md);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-user-card strong {
    display: block;
    color: #ffffff;
    font-size: 0.88rem;
}

.sidebar-user-card span {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.72rem;
}

.main-content {
    background: var(--haven-bg);
}

.main-content-inner {
    width: 100%;
    max-width: none;
    padding: 28px 30px 44px;
}

.mobile-topbar {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--haven-border);
    box-shadow: var(--haven-shadow-sm);
    backdrop-filter: blur(14px);
}

.mobile-topbar-brand img {
    background: #ffffff;
    border-radius: 10px;
}

.mobile-topbar-brand-text strong {
    color: var(--haven-navy);
}

.mobile-topbar-brand-text span {
    color: var(--haven-muted);
}

.mobile-menu-btn {
    border: 1px solid var(--haven-border);
    background: #ffffff;
    border-radius: 10px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--haven-heading);
    letter-spacing: -0.01em;
    font-weight: 650;
}

.page-title,
.section-title {
    color: var(--haven-navy);
}

.section-header {
    margin-bottom: 18px;
}

.section-header p {
    color: var(--haven-muted);
}

.content-card,
.premium-card {
    background: var(--haven-surface);
    border: 1px solid var(--haven-border);
    border-radius: var(--haven-radius-lg);
    box-shadow: var(--haven-shadow-sm);
}

.content-card:hover,
.premium-card:hover {
    border-color: #d8dee8;
}

.primary-btn,
a.primary-btn,
button.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid var(--haven-navy);
    border-radius: var(--haven-radius-sm);
    background: var(--haven-navy);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(32, 51, 95, 0.14);
    transition:
        background var(--haven-transition),
        border-color var(--haven-transition),
        box-shadow var(--haven-transition),
        transform var(--haven-transition);
}

.primary-btn:hover,
a.primary-btn:hover,
button.primary-btn:hover {
    border-color: var(--haven-navy-dark);
    background: var(--haven-navy-dark);
    color: #ffffff;
    box-shadow: 0 7px 16px rgba(32, 51, 95, 0.20);
    transform: translateY(-1px);
}

.secondary-btn,
a.secondary-btn,
button.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid var(--haven-border-strong);
    border-radius: var(--haven-radius-sm);
    background: #ffffff;
    color: var(--haven-navy);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition:
        background var(--haven-transition),
        border-color var(--haven-transition),
        transform var(--haven-transition);
}

.secondary-btn:hover,
a.secondary-btn:hover,
button.secondary-btn:hover {
    background: var(--haven-surface-soft);
    border-color: #aeb8c8;
    color: var(--haven-navy-dark);
    transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(32, 51, 95, 0.16);
    outline-offset: 2px;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    border: 1px solid var(--haven-border-strong);
    border-radius: var(--haven-radius-sm);
    background: #ffffff;
    color: var(--haven-text);
    transition:
        border-color var(--haven-transition),
        box-shadow var(--haven-transition);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
    border-color: var(--haven-navy);
    box-shadow: 0 0 0 3px rgba(32, 51, 95, 0.10);
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

.portal-table,
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.portal-table th,
.premium-table th {
    background: var(--haven-surface-soft);
    color: #526075;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.portal-table th,
.portal-table td,
.premium-table th,
.premium-table td {
    border-bottom-color: var(--haven-border);
}

.portal-table tbody tr,
.premium-table tbody tr {
    transition: background var(--haven-transition);
}

.portal-table tbody tr:hover,
.premium-table tbody tr:hover {
    background: #fafbfd;
}

.table-link {
    color: var(--haven-navy);
    font-weight: 700;
    text-decoration: none;
}

.table-link:hover {
    color: var(--haven-navy-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.alert,
.success-alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: var(--haven-radius-md);
    border: 1px solid var(--haven-border);
    box-shadow: var(--haven-shadow-sm);
    font-size: 0.9rem;
    font-weight: 650;
}

.success-alert {
    border-color: #bbf7d0;
    background: var(--haven-success-bg);
    color: var(--haven-success);
}

.alert {
    border-color: #fecaca;
    background: var(--haven-danger-bg);
    color: var(--haven-danger);
}

.modal-backdrop {
    backdrop-filter: blur(3px);
}

.modal-card {
    border: 1px solid var(--haven-border);
    border-radius: var(--haven-radius-xl);
    background: #ffffff;
    box-shadow: var(--haven-shadow-lg);
}

.roster-category-pill,
.status-pill,
.badge {
    border-radius: 999px;
}

.table-wrap,
.premium-table-wrap {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.table-wrap::-webkit-scrollbar,
.premium-table-wrap::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-wrap::-webkit-scrollbar-thumb,
.premium-table-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

@media (max-width: 980px) {
    .main-content-inner {
        padding: 20px 18px 36px;
    }

    .sidebar {
        box-shadow: 16px 0 45px rgba(15, 23, 42, 0.20);
    }
}

@media (max-width: 600px) {
    .main-content-inner {
        padding: 16px 12px 28px;
    }

    .content-card,
    .premium-card {
        border-radius: 15px;
    }

    .primary-btn,
    a.primary-btn,
    button.primary-btn,
    .secondary-btn,
    a.secondary-btn,
    button.secondary-btn {
        min-height: 44px;
    }

    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        font-size: 16px;
    }
}


/* Haven warmer typography */
body {
    font-weight: 400;
    line-height: 1.5;
}

p {
    line-height: 1.6;
}

.page-title,
.section-title {
    font-weight: 650;
}

.sidebar-nav a {
    font-weight: 600;
}

.sidebar-section-label {
    font-weight: 700;
}

.primary-btn,
a.primary-btn,
button.primary-btn,
.secondary-btn,
a.secondary-btn,
button.secondary-btn {
    font-weight: 650;
}

.portal-table th,
.premium-table th {
    font-weight: 700;
}

/* Haven Nunito typography */
body {
    font-family: "Nunito Sans", "Segoe UI", Arial, sans-serif;
    font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Nunito Sans", "Segoe UI", Arial, sans-serif;
    font-weight: 700;
}

.page-title,
.section-title {
    font-weight: 700;
}

.sidebar-brand-copy strong {
    font-weight: 700;
}

.sidebar-nav a {
    font-weight: 600;
}

.primary-btn,
.secondary-btn,
button {
    font-family: "Nunito Sans", "Segoe UI", Arial, sans-serif;
}

input,
select,
textarea {
    font-family: "Nunito Sans", "Segoe UI", Arial, sans-serif;
}

/* Haven navigation icons */
.nav-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-nav a[aria-current="page"] {
    position: relative;
}

.sidebar-nav a[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: #ffffff;
}

/* Haven signed-in user areas */
.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 11px;
}

.sidebar-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sidebar-user-copy {
    min-width: 0;
}

.sidebar-user-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-topbar-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    padding: 3px;
    border: 1px solid var(--haven-border);
}

/* Haven action-required modal */
.haven-action-modal {
    z-index: 9999;
    padding: 20px;
    background: rgba(15, 23, 42, 0.54);
}

.haven-action-modal__card {
    width: min(640px, calc(100vw - 28px));
    max-height: min(760px, calc(100vh - 40px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.haven-action-modal__header {
    padding: 24px 24px 18px;
    border-bottom: 1px solid var(--haven-border);
}

.haven-action-modal__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--haven-warning-bg);
    color: var(--haven-warning);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.haven-action-modal__header h2 {
    margin: 0 0 6px;
    color: var(--haven-navy);
    font-size: 1.35rem;
}

.haven-action-modal__header p {
    margin: 0;
    color: var(--haven-muted);
    font-size: 0.92rem;
}

.haven-action-modal__list {
    display: grid;
    gap: 9px;
    padding: 18px 24px;
    overflow-y: auto;
}

.haven-action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 15px;
    border: 1px solid var(--haven-border);
    border-radius: var(--haven-radius-md);
    background: var(--haven-surface-soft);
    transition:
        border-color var(--haven-transition),
        box-shadow var(--haven-transition),
        background var(--haven-transition);
}

.haven-action-item:hover {
    border-color: #d1d9e5;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.haven-action-item__content {
    min-width: 0;
}

.haven-action-item__content strong {
    display: block;
    color: var(--haven-heading);
    font-size: 0.94rem;
}

.haven-action-item__content span {
    display: block;
    margin-top: 4px;
    color: var(--haven-muted);
    font-size: 0.82rem;
}

.haven-action-item__button {
    flex: 0 0 auto;
}

.haven-action-modal__footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--haven-border);
    background: #ffffff;
}

@media (max-width: 600px) {
    .haven-action-modal {
        padding: 10px;
        align-items: flex-start;
    }

    .haven-action-modal__card {
        width: 100%;
        max-height: calc(100vh - 20px);
        margin-top: 5px;
        border-radius: 16px;
    }

    .haven-action-modal__header {
        padding: 19px 18px 15px;
    }

    .haven-action-modal__list {
        padding: 14px 18px;
    }

    .haven-action-item {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .haven-action-item__button {
        width: 100%;
    }

    .haven-action-modal__footer {
        padding: 14px 18px 18px;
    }

    .haven-action-modal__footer .secondary-btn {
        width: 100%;
    }
}

/* Haven sidebar logo banner */
.sidebar-top {
    padding: 0;
}

.sidebar-brand-card {
    width: 100%;
    height: 108px;
    padding: 8px;
    border: 0;
    border-radius: 0;
    background: #d7c64b;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sidebar-brand-card img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    object-fit: contain;
    display: block;
}

.sidebar-brand-copy {
    display: none;
}

/* =========================================================
   HAVEN DASHBOARD FACELIFT
   ========================================================= */

.dashboard-shell {
    display: grid;
    gap: 22px;
}

/* Hero */
.dashboard-hero-clean {
    position: relative;
    overflow: hidden;
    padding: 28px 30px;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #263f74 100%
        );
    box-shadow: 0 12px 30px rgba(32, 51, 95, 0.14);
}

.dashboard-hero-clean::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -120px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.045);
}

.dashboard-hero-clean__content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.dashboard-kicker {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.dashboard-hero-clean h1 {
    margin: 0 0 7px;
    color: #ffffff;
    font-size: clamp(1.7rem, 2vw, 2.2rem);
    font-weight: 800;
}

.dashboard-hero-clean p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.94rem;
    line-height: 1.6;
}

/* Statistics */
.dashboard-stats-clean {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-stat-clean {
    position: relative;
    min-width: 0;
    padding: 18px 18px 17px;
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
    transition:
        transform var(--haven-transition),
        box-shadow var(--haven-transition),
        border-color var(--haven-transition);
}

.dashboard-stat-clean::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(32, 51, 95, 0.72);
}

.dashboard-stat-clean:hover {
    transform: translateY(-2px);
    border-color: #d3dbe6;
    box-shadow: var(--haven-shadow-md);
}

.dashboard-stat-clean span {
    display: block;
    margin-bottom: 6px;
    color: var(--haven-muted);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.dashboard-stat-clean strong {
    display: block;
    color: var(--haven-navy);
    font-size: 1.8rem;
    line-height: 1.05;
    font-weight: 800;
}

.dashboard-stat-clean p {
    margin: 7px 0 0;
    color: #7b8799;
    font-size: 0.77rem;
}

/* Quick links */
.dashboard-quick-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-quick-link {
    position: relative;
    min-width: 0;
    padding: 16px 44px 16px 17px;
    border: 1px solid var(--haven-border);
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--haven-shadow-sm);
    transition:
        transform var(--haven-transition),
        border-color var(--haven-transition),
        box-shadow var(--haven-transition),
        background var(--haven-transition);
}

.dashboard-quick-link::after {
    content: "→";
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    transition:
        transform var(--haven-transition),
        color var(--haven-transition);
}

.dashboard-quick-link:hover {
    transform: translateY(-2px);
    border-color: #cdd6e2;
    background: #fbfcfe;
    box-shadow: var(--haven-shadow-md);
}

.dashboard-quick-link:hover::after {
    transform: translate(3px, -50%);
    color: var(--haven-navy);
}

.dashboard-quick-link strong {
    display: block;
    color: var(--haven-navy);
    font-size: 0.92rem;
    font-weight: 750;
}

.dashboard-quick-link span {
    display: block;
    margin-top: 4px;
    color: var(--haven-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

/* Main dashboard panels */
.dashboard-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-panel,
.dashboard-action-centre {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.dashboard-action-centre {
    grid-column: 1 / -1;
}

.dashboard-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px 13px;
}

.dashboard-panel__head h3 {
    margin: 0 0 3px;
    color: var(--haven-navy);
    font-size: 1rem;
    font-weight: 750;
}

.dashboard-panel__head p {
    margin: 0;
    color: var(--haven-muted);
    font-size: 0.78rem;
}

/* Recent tables */
.dashboard-panel .health-table-wrap {
    margin: 0 14px 14px;
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 13px;
}

.dashboard-panel .health-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-panel .health-table th {
    padding: 10px 11px;
    border-bottom: 1px solid var(--haven-border);
    background: #f7f9fc;
    color: #5d6b80;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.dashboard-panel .health-table td {
    padding: 11px;
    border-bottom: 1px solid #edf1f5;
    color: #5c6778;
    font-size: 0.78rem;
}

.dashboard-panel .health-table tbody tr {
    cursor: pointer;
    transition: background var(--haven-transition);
}

.dashboard-panel .health-table tbody tr:hover {
    background: #f8fafc;
}

.dashboard-panel .health-table tbody tr:last-child td {
    border-bottom: 0;
}

.health-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #edf2fa;
    color: #415781;
    font-size: 0.69rem;
    font-weight: 750;
}

/* Action Centre */
.dashboard-action-centre {
    padding-bottom: 18px;
}

.dashboard-action-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 0 18px 18px;
}

.dashboard-action-stat {
    padding: 14px;
    border: 1px solid var(--haven-border);
    border-radius: 13px;
    background: #f8fafc;
}

.dashboard-action-stat span {
    display: block;
    color: var(--haven-muted);
    font-size: 0.75rem;
}

.dashboard-action-stat strong {
    display: block;
    margin: 4px 0;
    color: var(--haven-navy);
    font-size: 1.35rem;
    font-weight: 800;
}

.dashboard-action-stat small {
    display: block;
    color: #8793a5;
    font-size: 0.69rem;
}

.dashboard-action-stat--overdue {
    border-color: #fecaca;
    background: #fff8f8;
}

.dashboard-action-stat--overdue strong {
    color: #b42318;
}

.dashboard-action-stat--notes {
    border-color: #fed7aa;
    background: #fffaf5;
}

.dashboard-action-stat--notes strong {
    color: #b45309;
}

.dashboard-action-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 0 18px;
}

.dashboard-action-column {
    min-width: 0;
}

.dashboard-action-column__head {
    margin-bottom: 10px;
}

.dashboard-action-column__head h4 {
    margin: 0 0 3px;
    color: var(--haven-navy);
    font-size: 0.88rem;
}

.dashboard-action-column__head p {
    margin: 0;
    color: var(--haven-muted);
    font-size: 0.74rem;
}

.dashboard-action-list {
    display: grid;
    gap: 8px;
}

.dashboard-action-item,
.dashboard-service-note-action {
    display: block;
    padding: 13px;
    border: 1px solid var(--haven-border);
    border-radius: 12px;
    background: #fbfcfe;
    color: inherit;
    text-decoration: none;
    transition:
        background var(--haven-transition),
        border-color var(--haven-transition),
        box-shadow var(--haven-transition);
}

.dashboard-action-item:hover,
.dashboard-service-note-action:hover {
    border-color: #d2dae5;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.dashboard-action-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.dashboard-action-type {
    color: #718096;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.dashboard-action-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #5c6b80;
    font-size: 0.66rem;
    font-weight: 800;
}

.dashboard-action-status--overdue {
    background: #fef2f2;
    color: #b42318;
}

.dashboard-action-status--today {
    background: #fff7ed;
    color: #b45309;
}

.dashboard-action-status--upcoming {
    background: #eef4ff;
    color: #415781;
}

.dashboard-action-item__main a {
    color: inherit;
    text-decoration: none;
}

.dashboard-action-item__main strong,
.dashboard-service-note-action strong {
    display: block;
    color: var(--haven-heading);
    font-size: 0.84rem;
}

.dashboard-action-item__main > a > span:not(.dashboard-action-type):not(.dashboard-action-status),
.dashboard-service-note-action > span {
    display: block;
    margin-top: 3px;
    color: var(--haven-muted);
    font-size: 0.76rem;
}

.dashboard-action-item__main small,
.dashboard-service-note-action small {
    display: block;
    margin-top: 5px;
    color: #8793a5;
    font-size: 0.7rem;
}

.dashboard-action-complete {
    margin-top: 10px;
}

.dashboard-action-complete button {
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid var(--haven-border-strong);
    border-radius: 9px;
    background: #ffffff;
    color: var(--haven-navy);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 750;
    cursor: pointer;
    transition:
        background var(--haven-transition),
        border-color var(--haven-transition);
}

.dashboard-action-complete button:hover {
    border-color: var(--haven-navy);
    background: var(--haven-navy-soft);
}

/* Empty states */
.dashboard-shell .empty-state {
    padding: 24px 18px;
    text-align: center;
}

.dashboard-shell .empty-state h4 {
    margin: 0 0 5px;
    color: var(--haven-navy);
    font-size: 0.9rem;
}

.dashboard-shell .empty-state p {
    margin: 0;
    color: var(--haven-muted);
    font-size: 0.76rem;
}

/* Mobile cards */
.dashboard-mobile-cards {
    display: none;
}

.dashboard-mobile-card {
    color: inherit;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 1100px) {
    .dashboard-stats-clean,
    .dashboard-quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .dashboard-action-centre {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .dashboard-hero-clean {
        padding: 22px 20px;
        border-radius: 17px;
    }

    .dashboard-stats-clean,
    .dashboard-quick-links,
    .dashboard-action-summary,
    .dashboard-action-columns {
        grid-template-columns: 1fr;
    }

    .dashboard-table-desktop {
        display: none;
    }

    .dashboard-mobile-cards {
        display: grid;
        gap: 8px;
        padding: 0 14px 14px;
    }

    .dashboard-mobile-card {
        display: block;
        padding: 13px;
        border: 1px solid var(--haven-border);
        border-radius: 12px;
        background: #f9fbfd;
    }

    .dashboard-mobile-card strong {
        display: block;
        color: var(--haven-navy);
        font-size: 0.86rem;
    }

    .dashboard-mobile-card span {
        display: block;
        margin-top: 4px;
        color: var(--haven-muted);
        font-size: 0.76rem;
    }

    .dashboard-mobile-card em {
        display: block;
        margin-top: 5px;
        color: #8793a5;
        font-size: 0.7rem;
        font-style: normal;
    }
}

/* =========================================================
   HAVEN DASHBOARD FACELIFT
   ========================================================= */

.dashboard-shell {
    display: grid;
    gap: 22px;
}

/* Hero */
.dashboard-hero-clean {
    position: relative;
    overflow: hidden;
    padding: 28px 30px;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #263f74 100%
        );
    box-shadow: 0 12px 30px rgba(32, 51, 95, 0.14);
}

.dashboard-hero-clean::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -120px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.045);
}

.dashboard-hero-clean__content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.dashboard-kicker {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.dashboard-hero-clean h1 {
    margin: 0 0 7px;
    color: #ffffff;
    font-size: clamp(1.7rem, 2vw, 2.2rem);
    font-weight: 800;
}

.dashboard-hero-clean p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.94rem;
    line-height: 1.6;
}

/* Statistics */
.dashboard-stats-clean {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-stat-clean {
    position: relative;
    min-width: 0;
    padding: 18px 18px 17px;
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
    transition:
        transform var(--haven-transition),
        box-shadow var(--haven-transition),
        border-color var(--haven-transition);
}

.dashboard-stat-clean::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(32, 51, 95, 0.72);
}

.dashboard-stat-clean:hover {
    transform: translateY(-2px);
    border-color: #d3dbe6;
    box-shadow: var(--haven-shadow-md);
}

.dashboard-stat-clean span {
    display: block;
    margin-bottom: 6px;
    color: var(--haven-muted);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.dashboard-stat-clean strong {
    display: block;
    color: var(--haven-navy);
    font-size: 1.8rem;
    line-height: 1.05;
    font-weight: 800;
}

.dashboard-stat-clean p {
    margin: 7px 0 0;
    color: #7b8799;
    font-size: 0.77rem;
}

/* Quick links */
.dashboard-quick-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-quick-link {
    position: relative;
    min-width: 0;
    padding: 16px 44px 16px 17px;
    border: 1px solid var(--haven-border);
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--haven-shadow-sm);
    transition:
        transform var(--haven-transition),
        border-color var(--haven-transition),
        box-shadow var(--haven-transition),
        background var(--haven-transition);
}

.dashboard-quick-link::after {
    content: "→";
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    transition:
        transform var(--haven-transition),
        color var(--haven-transition);
}

.dashboard-quick-link:hover {
    transform: translateY(-2px);
    border-color: #cdd6e2;
    background: #fbfcfe;
    box-shadow: var(--haven-shadow-md);
}

.dashboard-quick-link:hover::after {
    transform: translate(3px, -50%);
    color: var(--haven-navy);
}

.dashboard-quick-link strong {
    display: block;
    color: var(--haven-navy);
    font-size: 0.92rem;
    font-weight: 750;
}

.dashboard-quick-link span {
    display: block;
    margin-top: 4px;
    color: var(--haven-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

/* Main dashboard panels */
.dashboard-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-panel,
.dashboard-action-centre {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.dashboard-action-centre {
    grid-column: 1 / -1;
}

.dashboard-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px 13px;
}

.dashboard-panel__head h3 {
    margin: 0 0 3px;
    color: var(--haven-navy);
    font-size: 1rem;
    font-weight: 750;
}

.dashboard-panel__head p {
    margin: 0;
    color: var(--haven-muted);
    font-size: 0.78rem;
}

/* Recent tables */
.dashboard-panel .health-table-wrap {
    margin: 0 14px 14px;
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 13px;
}

.dashboard-panel .health-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-panel .health-table th {
    padding: 10px 11px;
    border-bottom: 1px solid var(--haven-border);
    background: #f7f9fc;
    color: #5d6b80;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.dashboard-panel .health-table td {
    padding: 11px;
    border-bottom: 1px solid #edf1f5;
    color: #5c6778;
    font-size: 0.78rem;
}

.dashboard-panel .health-table tbody tr {
    cursor: pointer;
    transition: background var(--haven-transition);
}

.dashboard-panel .health-table tbody tr:hover {
    background: #f8fafc;
}

.dashboard-panel .health-table tbody tr:last-child td {
    border-bottom: 0;
}

.health-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #edf2fa;
    color: #415781;
    font-size: 0.69rem;
    font-weight: 750;
}

/* Action Centre */
.dashboard-action-centre {
    padding-bottom: 18px;
}

.dashboard-action-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 0 18px 18px;
}

.dashboard-action-stat {
    padding: 14px;
    border: 1px solid var(--haven-border);
    border-radius: 13px;
    background: #f8fafc;
}

.dashboard-action-stat span {
    display: block;
    color: var(--haven-muted);
    font-size: 0.75rem;
}

.dashboard-action-stat strong {
    display: block;
    margin: 4px 0;
    color: var(--haven-navy);
    font-size: 1.35rem;
    font-weight: 800;
}

.dashboard-action-stat small {
    display: block;
    color: #8793a5;
    font-size: 0.69rem;
}

.dashboard-action-stat--overdue {
    border-color: #fecaca;
    background: #fff8f8;
}

.dashboard-action-stat--overdue strong {
    color: #b42318;
}

.dashboard-action-stat--notes {
    border-color: #fed7aa;
    background: #fffaf5;
}

.dashboard-action-stat--notes strong {
    color: #b45309;
}

.dashboard-action-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 0 18px;
}

.dashboard-action-column {
    min-width: 0;
}

.dashboard-action-column__head {
    margin-bottom: 10px;
}

.dashboard-action-column__head h4 {
    margin: 0 0 3px;
    color: var(--haven-navy);
    font-size: 0.88rem;
}

.dashboard-action-column__head p {
    margin: 0;
    color: var(--haven-muted);
    font-size: 0.74rem;
}

.dashboard-action-list {
    display: grid;
    gap: 8px;
}

.dashboard-action-item,
.dashboard-service-note-action {
    display: block;
    padding: 13px;
    border: 1px solid var(--haven-border);
    border-radius: 12px;
    background: #fbfcfe;
    color: inherit;
    text-decoration: none;
    transition:
        background var(--haven-transition),
        border-color var(--haven-transition),
        box-shadow var(--haven-transition);
}

.dashboard-action-item:hover,
.dashboard-service-note-action:hover {
    border-color: #d2dae5;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.dashboard-action-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.dashboard-action-type {
    color: #718096;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.dashboard-action-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #5c6b80;
    font-size: 0.66rem;
    font-weight: 800;
}

.dashboard-action-status--overdue {
    background: #fef2f2;
    color: #b42318;
}

.dashboard-action-status--today {
    background: #fff7ed;
    color: #b45309;
}

.dashboard-action-status--upcoming {
    background: #eef4ff;
    color: #415781;
}

.dashboard-action-item__main a {
    color: inherit;
    text-decoration: none;
}

.dashboard-action-item__main strong,
.dashboard-service-note-action strong {
    display: block;
    color: var(--haven-heading);
    font-size: 0.84rem;
}

.dashboard-action-item__main > a > span:not(.dashboard-action-type):not(.dashboard-action-status),
.dashboard-service-note-action > span {
    display: block;
    margin-top: 3px;
    color: var(--haven-muted);
    font-size: 0.76rem;
}

.dashboard-action-item__main small,
.dashboard-service-note-action small {
    display: block;
    margin-top: 5px;
    color: #8793a5;
    font-size: 0.7rem;
}

.dashboard-action-complete {
    margin-top: 10px;
}

.dashboard-action-complete button {
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid var(--haven-border-strong);
    border-radius: 9px;
    background: #ffffff;
    color: var(--haven-navy);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 750;
    cursor: pointer;
    transition:
        background var(--haven-transition),
        border-color var(--haven-transition);
}

.dashboard-action-complete button:hover {
    border-color: var(--haven-navy);
    background: var(--haven-navy-soft);
}

/* Empty states */
.dashboard-shell .empty-state {
    padding: 24px 18px;
    text-align: center;
}

.dashboard-shell .empty-state h4 {
    margin: 0 0 5px;
    color: var(--haven-navy);
    font-size: 0.9rem;
}

.dashboard-shell .empty-state p {
    margin: 0;
    color: var(--haven-muted);
    font-size: 0.76rem;
}

/* Mobile cards */
.dashboard-mobile-cards {
    display: none;
}

.dashboard-mobile-card {
    color: inherit;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 1100px) {
    .dashboard-stats-clean,
    .dashboard-quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .dashboard-action-centre {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .dashboard-hero-clean {
        padding: 22px 20px;
        border-radius: 17px;
    }

    .dashboard-stats-clean,
    .dashboard-quick-links,
    .dashboard-action-summary,
    .dashboard-action-columns {
        grid-template-columns: 1fr;
    }

    .dashboard-table-desktop {
        display: none;
    }

    .dashboard-mobile-cards {
        display: grid;
        gap: 8px;
        padding: 0 14px 14px;
    }

    .dashboard-mobile-card {
        display: block;
        padding: 13px;
        border: 1px solid var(--haven-border);
        border-radius: 12px;
        background: #f9fbfd;
    }

    .dashboard-mobile-card strong {
        display: block;
        color: var(--haven-navy);
        font-size: 0.86rem;
    }

    .dashboard-mobile-card span {
        display: block;
        margin-top: 4px;
        color: var(--haven-muted);
        font-size: 0.76rem;
    }

    .dashboard-mobile-card em {
        display: block;
        margin-top: 5px;
        color: #8793a5;
        font-size: 0.7rem;
        font-style: normal;
    }
}

/* =========================================================
   HAVEN CLIENT LIST FACELIFT
   ========================================================= */

.client-list-shell {
    display: grid;
    gap: 20px;
}

/* Client page hero */
.client-list-shell .health-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: 26px 28px;
    border: 0;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #294478 100%
        );
    box-shadow: 0 12px 30px rgba(32, 51, 95, 0.14);
}

.client-list-shell .health-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -130px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.client-list-shell .health-hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.client-list-shell .health-hero .eyebrow {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.70);
    font-size: 0.71rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.client-list-shell .health-hero h1 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: clamp(1.7rem, 2vw, 2.15rem);
    font-weight: 800;
}

.client-list-shell .health-hero p {
    max-width: 670px;
    margin: 0;
    color: rgba(255, 255, 255, 0.80);
    font-size: 0.91rem;
    line-height: 1.55;
}

.client-list-shell .health-hero-panel-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.client-list-shell .health-hero-panel-actions .secondary-btn {
    border-color: rgba(255, 255, 255, 0.20);
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    box-shadow: none;
}

.client-list-shell .health-hero-panel-actions .secondary-btn:hover {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.client-list-shell .health-hero-panel-actions .primary-btn {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--haven-navy);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.13);
}

.client-list-shell .health-hero-panel-actions .primary-btn:hover {
    border-color: #ffffff;
    background: #f6f8fc;
    color: var(--haven-navy-dark);
}

/* Main client card */
.client-list-shell > .health-card {
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--haven-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

/* Search area */
.client-search-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--haven-border);
    background: #fbfcfe;
}

.client-search-input-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 220px;
}

.client-search-input-wrap::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    width: 15px;
    height: 15px;
    border: 2px solid #8793a5;
    border-radius: 50%;
    transform: translateY(-58%);
    pointer-events: none;
}

.client-search-input-wrap::after {
    content: "";
    position: absolute;
    left: 27px;
    top: calc(50% + 6px);
    width: 7px;
    height: 2px;
    border-radius: 999px;
    background: #8793a5;
    transform: rotate(45deg);
    transform-origin: left center;
    pointer-events: none;
}

.client-search-input-wrap .form-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px 10px 43px;
    border: 1px solid var(--haven-border-strong);
    border-radius: 11px;
    background: #ffffff;
    color: var(--haven-text);
    font-size: 0.88rem;
}

.client-search-input-wrap .form-input:focus {
    border-color: var(--haven-navy);
    box-shadow: 0 0 0 3px rgba(32, 51, 95, 0.09);
}

.client-search-input-wrap .form-input::placeholder {
    color: #9aa5b5;
}

/* Desktop table */
.client-table-desktop {
    padding: 16px 18px 18px;
}

.client-table-desktop .health-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--haven-border);
    border-radius: 14px;
    background: #ffffff;
}

.client-table-desktop .health-table {
    width: 100%;
    min-width: 1320px;
    border-collapse: separate;
    border-spacing: 0;
}

.client-table-desktop .health-table thead th {
    padding: 11px 12px;
    border-bottom: 1px solid var(--haven-border);
    background: #f6f8fb;
    color: #58667a;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.client-table-desktop .health-table thead th:first-child {
    border-top-left-radius: 13px;
}

.client-table-desktop .health-table thead th:last-child {
    border-top-right-radius: 13px;
}

.client-table-desktop .health-table thead a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    text-decoration: none;
}

.client-table-desktop .health-table thead a::after {
    content: "↕";
    color: #a3adbb;
    font-size: 0.72rem;
    font-weight: 400;
}

.client-table-desktop .health-table thead a:hover {
    color: var(--haven-navy);
}

.client-table-desktop .health-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #edf1f5;
    color: #5a6678;
    font-size: 0.79rem;
    vertical-align: middle;
}

.client-table-desktop .health-table tbody tr:last-child td {
    border-bottom: 0;
}

.client-table-row-link {
    cursor: pointer;
    transition:
        background var(--haven-transition),
        box-shadow var(--haven-transition);
}

.client-table-row-link:hover {
    background: #f8fafc;
}

.client-table-row-link:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid rgba(32, 51, 95, 0.16);
    outline-offset: -3px;
}

/* Main client cell */
.client-list-shell .primary-cell {
    min-width: 155px;
}

.client-list-shell .primary-cell strong {
    display: block;
    color: var(--haven-navy);
    font-size: 0.82rem;
    font-weight: 750;
}

.client-list-shell .primary-cell span {
    display: block;
    margin-top: 2px;
    color: #8a95a5;
    font-size: 0.7rem;
}

/* Pills */
.client-list-shell .health-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #edf2f8;
    color: #56667d;
    font-size: 0.68rem;
    font-weight: 750;
    white-space: nowrap;
}

.client-list-shell .health-pill-success {
    border: 1px solid #bbf7d0;
    background: #ecfdf5;
    color: #166534;
}

.client-list-shell .health-pill-soft {
    background: #eef2f7;
    color: #56667d;
}

/* Mobile cards */
.client-mobile-cards {
    display: none;
}

.client-mobile-card {
    color: inherit;
    text-decoration: none;
}

/* Pagination */
.client-list-shell .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 18px 18px;
}

.client-list-shell .pagination-info {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    color: var(--haven-muted);
    font-size: 0.78rem;
    font-weight: 650;
}

/* Tablet */
@media (max-width: 1050px) {
    .client-list-shell .health-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .client-list-shell .health-hero-panel-actions {
        justify-content: flex-start;
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 760px) {
    .client-list-shell {
        gap: 14px;
    }

    .client-list-shell .health-hero {
        padding: 21px 18px;
        border-radius: 17px;
    }

    .client-list-shell .health-hero-panel-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .client-list-shell .health-hero-panel-actions a {
        width: 100%;
    }

    .client-search-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 14px;
    }

    .client-search-input-wrap {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .client-search-bar .primary-btn,
    .client-search-bar .secondary-btn {
        width: 100%;
    }

    .client-table-desktop {
        display: none;
    }

    .client-mobile-cards {
        display: grid;
        gap: 10px;
        padding: 14px;
    }

    .client-mobile-card {
        display: block;
        padding: 15px;
        border: 1px solid var(--haven-border);
        border-radius: 14px;
        background: #ffffff;
        box-shadow: var(--haven-shadow-sm);
        transition:
            border-color var(--haven-transition),
            box-shadow var(--haven-transition),
            transform var(--haven-transition);
    }

    .client-mobile-card:hover {
        transform: translateY(-1px);
        border-color: #d0d9e5;
        box-shadow: var(--haven-shadow-md);
    }

    .client-mobile-card__top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 14px;
    }

    .client-mobile-card__number {
        display: block;
        margin-bottom: 3px;
        color: #8490a1;
        font-size: 0.67rem;
        font-weight: 750;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .client-mobile-card h3 {
        margin: 0;
        color: var(--haven-navy);
        font-size: 1rem;
        font-weight: 750;
    }

    .client-mobile-card__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding-top: 13px;
        border-top: 1px solid var(--haven-border);
    }

    .client-mobile-card__grid > div {
        min-width: 0;
    }

    .client-mobile-card__grid span {
        display: block;
        margin-bottom: 2px;
        color: #8a95a5;
        font-size: 0.67rem;
    }

    .client-mobile-card__grid strong {
        display: block;
        overflow-wrap: anywhere;
        color: #4d596a;
        font-size: 0.76rem;
        font-weight: 700;
    }

    .client-list-shell .pagination {
        padding: 4px 14px 16px;
    }
}

@media (max-width: 460px) {
    .client-list-shell .health-hero-panel-actions {
        grid-template-columns: 1fr;
    }

    .client-mobile-card__grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   CLIENT LIST PAGE SIZE / PAGINATION
   ========================================================= */

.client-list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 18px;
    border-top: 1px solid var(--haven-border);
    background: #fbfcfe;
}

.client-list-count {
    color: var(--haven-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.client-list-count strong {
    color: var(--haven-navy);
    font-weight: 750;
}

.client-list-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}

.client-page-size-form {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--haven-muted);
    font-size: 0.78rem;
}

.client-page-size-form label {
    margin: 0;
    color: var(--haven-muted);
    font-weight: 650;
}

.client-page-size-form select {
    width: 78px;
    height: 38px;
    padding: 6px 28px 6px 10px;
    border: 1px solid var(--haven-border-strong);
    border-radius: 9px;
    background: #ffffff;
    color: var(--haven-navy);
    font-family: "Nunito Sans", "Segoe UI", Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.client-page-size-form select:focus {
    outline: none;
    border-color: var(--haven-navy);
    box-shadow: 0 0 0 3px rgba(32, 51, 95, 0.09);
}

.client-list-footer .pagination {
    padding: 0;
    margin: 0;
}

@media (max-width: 850px) {
    .client-list-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .client-list-controls {
        align-items: stretch;
        justify-content: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .client-list-footer .pagination {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .client-page-size-form {
        justify-content: space-between;
    }

    .client-list-footer .pagination {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-list-footer .pagination .secondary-btn {
        width: 100%;
    }

    .client-list-footer .pagination-info {
        grid-column: 1 / -1;
        justify-content: center;
        order: -1;
    }
}

/* =========================================================
   HAVEN CLIENT PROFILE FACELIFT
   ========================================================= */

.customer-detail-shell {
    display: grid;
    gap: 18px;
}

/* Hero */
.customer-detail-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: 25px 28px;
    border: 0;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #294478 100%
        );
    box-shadow: 0 12px 30px rgba(32, 51, 95, 0.14);
}

.customer-detail-hero::after {
    content: "";
    position: absolute;
    right: -95px;
    top: -135px;
    width: 310px;
    height: 310px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.045);
    pointer-events: none;
}

.customer-detail-hero__main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 17px;
    min-width: 0;
}

.customer-detail-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
    font-size: 1.65rem;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.customer-detail-hero__copy {
    min-width: 0;
}

.customer-detail-kicker {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.customer-detail-hero__copy h1 {
    margin: 0 0 2px;
    color: #ffffff;
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 800;
    line-height: 1.15;
}

.customer-detail-hero__copy > p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    font-weight: 650;
}

.customer-detail-hero__meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 9px;
}

.customer-detail-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.90);
    font-size: 0.68rem;
    font-weight: 750;
}

.customer-detail-meta-pill--success {
    border-color: rgba(187, 247, 208, 0.28);
    background: rgba(22, 101, 52, 0.32);
    color: #dcfce7;
}

.customer-detail-hero__actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-detail-hero__actions .secondary-btn {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.customer-detail-hero__actions .secondary-btn:hover {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.customer-detail-hero__actions .primary-btn {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--haven-navy);
}

.customer-detail-hero__actions .primary-btn:hover {
    background: #f5f7fb;
    color: var(--haven-navy-dark);
}

/* Main profile sections */
.customer-section-card {
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--haven-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.customer-section-card--spaced {
    margin: 0;
}

.customer-section-card__head,
.profile-timeline-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 19px;
    border-bottom: 1px solid var(--haven-border);
    background: #fbfcfe;
}

.customer-section-card__head h3,
.profile-timeline-head h3 {
    margin: 0 0 3px;
    color: var(--haven-navy);
    font-size: 0.98rem;
    font-weight: 750;
}

.customer-section-card__head p,
.profile-timeline-head p {
    margin: 0;
    color: var(--haven-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

/* Information grid */
.customer-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 8px 18px 18px;
}

.customer-info-item {
    min-width: 0;
    padding: 14px 15px;
    border-bottom: 1px solid #edf1f5;
}

.customer-info-item:nth-child(3n + 2),
.customer-info-item:nth-child(3n + 3) {
    border-left: 1px solid #edf1f5;
}

.customer-info-item span {
    display: block;
    margin-bottom: 4px;
    color: #8994a5;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.customer-info-item strong {
    display: block;
    color: #465267;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.customer-info-item--full {
    grid-column: 1 / -1;
    margin-top: 8px;
    border: 1px solid var(--haven-border);
    border-radius: 11px;
    background: #f9fbfd;
}

.customer-info-item--full + .customer-info-item--full {
    margin-top: 8px;
}

/* Service agreements */
.customer-summary-stack {
    display: grid;
    gap: 11px;
    padding: 17px 18px 19px;
}

.customer-summary-row {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 16px 17px;
    border: 1px solid var(--haven-border);
    border-radius: 14px;
    background: #fbfcfe;
    transition:
        border-color var(--haven-transition),
        box-shadow var(--haven-transition),
        background var(--haven-transition);
}

.customer-summary-row:hover {
    border-color: #d1dae6;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.customer-summary-row > span:first-child {
    display: block;
    margin-bottom: 4px;
    color: var(--haven-navy);
    font-size: 0.94rem;
    font-weight: 800;
}

.customer-summary-row > strong {
    display: block;
    color: #657185;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.5;
}

.customer-agreement-actions {
    margin-top: 8px;
    padding-top: 11px;
    border-top: 1px solid var(--haven-border);
}

/* Service History */
.customer-service-table-desktop {
    padding: 16px 18px 18px;
}

.customer-service-table-desktop .health-table-wrap,
.customer-history-table-desktop .health-table-wrap {
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 13px;
}

.customer-service-table-desktop .health-table,
.customer-history-table-desktop .health-table {
    width: 100%;
    border-collapse: collapse;
}

.customer-service-table-desktop .health-table th,
.customer-history-table-desktop .health-table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--haven-border);
    background: #f6f8fb;
    color: #5f6c7f;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-align: left;
    text-transform: uppercase;
}

.customer-service-table-desktop .health-table td,
.customer-history-table-desktop .health-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf1f5;
    color: #5a6678;
    font-size: 0.77rem;
}

.customer-service-table-desktop .health-table tbody tr:last-child td,
.customer-history-table-desktop .health-table tbody tr:last-child td {
    border-bottom: 0;
}

.customer-service-table-desktop .health-table tbody tr:hover,
.customer-history-table-desktop .health-table tbody tr:hover {
    background: #f8fafc;
}

.customer-service-mobile-cards,
.customer-history-mobile-cards {
    display: none;
}

/* Timeline */
.profile-timeline-section {
    padding: 0;
}

.profile-timeline-add {
    position: relative;
}

.profile-timeline-add > summary {
    list-style: none;
    cursor: pointer;
}

.profile-timeline-add > summary::-webkit-details-marker {
    display: none;
}

.profile-timeline-add[open] {
    width: 100%;
}

.profile-timeline-add[open] > summary {
    margin-left: auto;
    width: fit-content;
}

.profile-timeline-form {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid var(--haven-border);
    border-radius: 14px;
    background: #f8fafc;
}

.profile-timeline-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-timeline-form-grid label {
    display: block;
    margin-bottom: 5px;
    color: #566378;
    font-size: 0.74rem;
    font-weight: 750;
}

.profile-timeline-form-full {
    grid-column: 1 / -1;
}

.profile-timeline-form input,
.profile-timeline-form select,
.profile-timeline-form textarea {
    width: 100%;
}

.profile-timeline-file-help {
    display: block;
    margin-top: 6px;
    color: #8793a5;
    font-size: 0.69rem;
    line-height: 1.45;
}

.profile-timeline-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.profile-timeline-list {
    position: relative;
    display: grid;
    gap: 0;
    padding: 18px 20px 20px 42px;
}

.profile-timeline-list::before {
    content: "";
    position: absolute;
    left: 27px;
    top: 25px;
    bottom: 25px;
    width: 2px;
    border-radius: 999px;
    background: #e1e7ef;
}

.profile-timeline-entry {
    position: relative;
    padding: 15px 16px;
    border: 1px solid var(--haven-border);
    border-radius: 13px;
    background: #ffffff;
}

.profile-timeline-entry + .profile-timeline-entry {
    margin-top: 11px;
}

.profile-timeline-entry::before {
    content: "";
    position: absolute;
    left: -23px;
    top: 21px;
    width: 10px;
    height: 10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--haven-navy);
    box-shadow: 0 0 0 1px #cdd6e2;
}

.profile-timeline-entry-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.profile-timeline-entry-top time {
    color: #8994a5;
    font-size: 0.69rem;
}

.profile-timeline-entry h4 {
    margin: 0 0 7px;
    color: var(--haven-navy);
    font-size: 0.9rem;
    font-weight: 750;
}

.profile-timeline-notes {
    color: #5d697b;
    font-size: 0.78rem;
    line-height: 1.6;
}

.profile-timeline-attachments {
    margin-top: 12px;
    padding: 11px;
    border: 1px solid var(--haven-border);
    border-radius: 10px;
    background: #f8fafc;
}

.profile-timeline-attachments > strong {
    display: block;
    margin-bottom: 7px;
    color: #657185;
    font-size: 0.7rem;
}

.profile-timeline-attachment-list {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.profile-timeline-attachment {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid var(--haven-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--haven-navy);
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
}

.profile-timeline-attachment:hover {
    border-color: var(--haven-navy);
}

.profile-timeline-follow-up {
    margin-top: 11px;
    padding: 8px 10px;
    border: 1px solid #fed7aa;
    border-radius: 9px;
    background: #fffaf5;
    color: #9a4b08;
    font-size: 0.72rem;
}

.profile-timeline-follow-up--complete {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.profile-timeline-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid #edf1f5;
    color: #8a95a5;
    font-size: 0.68rem;
}

.profile-timeline-meta strong {
    color: #657185;
}

/* Client History */
.customer-history-table-desktop {
    padding: 16px 18px 18px;
}

/* Mobile */
@media (max-width: 900px) {
    .customer-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-info-item:nth-child(3n + 2),
    .customer-info-item:nth-child(3n + 3) {
        border-left: 0;
    }

    .customer-info-item:nth-child(even) {
        border-left: 1px solid #edf1f5;
    }
}

@media (max-width: 760px) {
    .customer-detail-shell {
        gap: 14px;
    }

    .customer-detail-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 20px 18px;
        border-radius: 17px;
    }

    .customer-detail-avatar {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
        border-radius: 15px;
        font-size: 1.35rem;
    }

    .customer-detail-hero__actions {
        width: 100%;
    }

    .customer-detail-hero__actions .primary-btn,
    .customer-detail-hero__actions .secondary-btn {
        flex: 1;
    }

    .customer-section-card {
        border-radius: 15px;
    }

    .customer-section-card__head,
    .profile-timeline-head {
        align-items: stretch;
        flex-direction: column;
        padding: 15px 16px;
    }

    .customer-info-grid {
        grid-template-columns: 1fr;
        padding: 5px 15px 15px;
    }

    .customer-info-item,
    .customer-info-item:nth-child(even) {
        border-left: 0;
    }

    .customer-info-item--full {
        grid-column: auto;
    }

    .customer-summary-stack {
        padding: 14px;
    }

    .customer-service-table-desktop,
    .customer-history-table-desktop {
        display: none;
    }

    .customer-service-mobile-cards,
    .customer-history-mobile-cards {
        display: grid;
        gap: 9px;
        padding: 14px;
    }

    .customer-service-card,
    .customer-history-card {
        display: block;
        padding: 14px;
        border: 1px solid var(--haven-border);
        border-radius: 13px;
        background: #fbfcfe;
        color: inherit;
        text-decoration: none;
    }

    .customer-service-card__top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 9px;
    }

    .customer-service-card__date {
        color: #8793a5;
        font-size: 0.7rem;
    }

    .customer-service-card > strong {
        display: block;
        color: var(--haven-navy);
        font-size: 0.83rem;
    }

    .customer-service-card__meta {
        margin-top: 5px;
        color: var(--haven-muted);
        font-size: 0.72rem;
    }

    .customer-history-card {
        display: grid;
        gap: 8px;
    }

    .customer-history-card__row {
        display: flex;
        justify-content: space-between;
        gap: 14px;
    }

    .customer-history-card__row span {
        color: #8994a5;
        font-size: 0.69rem;
    }

    .customer-history-card__row strong {
        color: #566174;
        font-size: 0.72rem;
        text-align: right;
        overflow-wrap: anywhere;
    }

    .profile-timeline-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-timeline-form-full {
        grid-column: auto;
    }

    .profile-timeline-list {
        padding: 14px 14px 16px;
    }

    .profile-timeline-list::before,
    .profile-timeline-entry::before {
        display: none;
    }

    .profile-timeline-entry-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

/* =========================================================
   HAVEN STAFF DIRECTORY
   ========================================================= */

.staff-list-shell {
    display: grid;
    gap: 20px;
}

.staff-list-shell .health-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: 26px 28px;
    border: 0;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #294478 100%
        );
    box-shadow: 0 12px 30px rgba(32, 51, 95, 0.14);
}

.staff-list-shell .health-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -130px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.staff-list-shell .health-hero-copy {
    position: relative;
    z-index: 1;
}

.staff-list-shell .health-hero .eyebrow {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.70);
    font-size: 0.71rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.staff-list-shell .health-hero h1 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: clamp(1.7rem, 2vw, 2.15rem);
    font-weight: 800;
}

.staff-list-shell .health-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.80);
    font-size: 0.91rem;
}

.staff-list-shell .health-hero-panel-actions {
    position: relative;
    z-index: 1;
}

.staff-list-shell .health-hero-panel-actions .primary-btn {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--haven-navy);
}

.staff-list-shell > .health-card {
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--haven-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.staff-list-shell .uniform-card-head {
    padding: 17px 19px;
    border-bottom: 1px solid var(--haven-border);
    background: #fbfcfe;
}

.staff-list-shell .uniform-card-head h3 {
    margin: 0 0 3px;
    color: var(--haven-navy);
    font-size: 0.98rem;
}

.staff-list-shell .uniform-card-head p {
    margin: 0;
    color: var(--haven-muted);
    font-size: 0.76rem;
}

/* Staff desktop table */

.staff-list-shell .uniform-table-desktop {
    padding: 16px 18px 18px;
}

.staff-list-shell .health-table-wrap {
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 14px;
}

.staff-list-shell .health-table {
    width: 100%;
    border-collapse: collapse;
}

.staff-list-shell .health-table th {
    padding: 11px 12px;
    border-bottom: 1px solid var(--haven-border);
    background: #f6f8fb;
    color: #59677a;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-align: left;
    text-transform: uppercase;
}

.staff-list-shell .health-table td {
    padding: 12px;
    border-bottom: 1px solid #edf1f5;
    color: #596578;
    font-size: 0.78rem;
    vertical-align: middle;
}

.staff-list-shell .health-table tbody tr:last-child td {
    border-bottom: 0;
}

.staff-list-shell .health-table tbody tr {
    transition: background var(--haven-transition);
}

.staff-list-shell .health-table tbody tr:hover {
    background: #f8fafc;
}

.staff-list-shell .primary-cell strong {
    display: block;
    color: var(--haven-navy);
    font-size: 0.82rem;
}

.staff-list-shell .primary-cell span {
    display: block;
    margin-top: 2px;
    color: #8994a5;
    font-size: 0.69rem;
}

.colour-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #d6dde7;
    vertical-align: middle;
}

/* Staff mobile */

.staff-list-shell .uniform-mobile-cards {
    display: none;
}

.staff-list-shell .uniform-mobile-card {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   HAVEN EMPLOYEE PROFILE
   ========================================================= */

.staff-detail-shell {
    display: grid;
    gap: 18px;
}

/* Hero */

.staff-detail-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: 25px 28px;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #294478 100%
        );
    box-shadow: 0 12px 30px rgba(32, 51, 95, 0.14);
}

.staff-detail-hero::after {
    content: "";
    position: absolute;
    right: -95px;
    top: -135px;
    width: 310px;
    height: 310px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.045);
    pointer-events: none;
}

.staff-detail-hero__main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 17px;
    min-width: 0;
}

.staff-detail-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
    font-size: 1.65rem;
    font-weight: 800;
}

.staff-detail-kicker {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.staff-detail-hero__copy h1 {
    margin: 0 0 2px;
    color: #ffffff;
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 800;
}

.staff-detail-hero__copy > p {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.82rem;
}

.staff-detail-hero__meta {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 9px;
}

.staff-detail-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.90);
    font-size: 0.68rem;
    font-weight: 750;
}

.staff-detail-hero__actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.staff-detail-hero__actions .secondary-btn {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.staff-detail-hero__actions .primary-btn {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--haven-navy);
}

.staff-reset-password-form {
    display: inline-flex;
    margin: 0;
}

.staff-danger-btn {
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid rgba(254, 202, 202, 0.32);
    border-radius: 10px;
    background: rgba(153, 27, 27, 0.22);
    color: #fee2e2;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 750;
    cursor: pointer;
    transition:
        background var(--haven-transition),
        border-color var(--haven-transition);
}

.staff-danger-btn:hover {
    border-color: rgba(254, 202, 202, 0.55);
    background: rgba(153, 27, 27, 0.36);
}

/* Employee profile cards */

.staff-detail-shell > .card,
.staff-detail-shell .grid-2 > .card {
    overflow: hidden;
    margin: 0;
    padding: 18px 19px;
    border: 1px solid var(--haven-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.staff-detail-shell .grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.staff-detail-shell .card h2 {
    margin: -18px -19px 15px;
    padding: 15px 19px;
    border-bottom: 1px solid var(--haven-border);
    background: #fbfcfe;
    color: var(--haven-navy);
    font-size: 0.98rem;
    font-weight: 750;
}

.staff-detail-shell .card > p {
    display: grid;
    grid-template-columns: minmax(135px, 0.45fr) minmax(0, 1fr);
    gap: 14px;
    margin: 0;
    padding: 9px 0;
    border-bottom: 1px solid #edf1f5;
    color: #536074;
    font-size: 0.78rem;
    line-height: 1.45;
}

.staff-detail-shell .card > p:last-of-type {
    border-bottom: 0;
}

.staff-detail-shell .card > p > strong:first-child {
    color: #8792a3;
    font-size: 0.7rem;
    font-weight: 750;
}

/* Onboarding */

.staff-detail-shell .card > .btn {
    margin-bottom: 14px;
}

.staff-detail-shell .table {
    width: 100%;
    margin-top: 14px;
    border: 1px solid var(--haven-border);
    border-radius: 12px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.staff-detail-shell .table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--haven-border);
    background: #f6f8fb;
    color: #5d697b;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.staff-detail-shell .table td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf1f5;
    color: #596578;
    font-size: 0.76rem;
}

.staff-detail-shell .table tbody tr:last-child td {
    border-bottom: 0;
}

.staff-detail-shell .table tbody tr:hover {
    background: #f8fafc;
}

/* Staff timeline becomes a full profile card */

.staff-detail-shell .profile-timeline-section--staff {
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--haven-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

/* Responsive */

@media (max-width: 1050px) {
    .staff-detail-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .staff-detail-hero__actions {
        justify-content: flex-start;
        width: 100%;
    }
}

@media (max-width: 760px) {
    .staff-list-shell {
        gap: 14px;
    }

    .staff-list-shell .health-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 21px 18px;
        border-radius: 17px;
    }

    .staff-list-shell .health-hero-panel-actions,
    .staff-list-shell .health-hero-panel-actions .primary-btn {
        width: 100%;
    }

    .staff-list-shell .uniform-table-desktop {
        display: none;
    }

    .staff-list-shell .uniform-mobile-cards {
        display: grid;
        gap: 10px;
        padding: 14px;
    }

    .staff-list-shell .uniform-mobile-card {
        display: block;
        padding: 15px;
        border: 1px solid var(--haven-border);
        border-radius: 14px;
        background: #ffffff;
        box-shadow: var(--haven-shadow-sm);
    }

    .staff-list-shell .uniform-mobile-card-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 13px;
    }

    .staff-list-shell .uniform-mobile-card-top span {
        display: block;
        margin-bottom: 3px;
        color: #8994a5;
        font-size: 0.67rem;
        font-weight: 750;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .staff-list-shell .uniform-mobile-card-top h3 {
        margin: 0;
        color: var(--haven-navy);
        font-size: 1rem;
    }

    .staff-list-shell .uniform-mobile-card-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding-top: 13px;
        border-top: 1px solid var(--haven-border);
    }

    .staff-list-shell .uniform-mobile-card-grid span {
        display: block;
        color: #8994a5;
        font-size: 0.67rem;
    }

    .staff-list-shell .uniform-mobile-card-grid strong {
        display: block;
        margin-top: 2px;
        color: #536074;
        font-size: 0.75rem;
        overflow-wrap: anywhere;
    }

    .staff-detail-shell {
        gap: 14px;
    }

    .staff-detail-hero {
        padding: 20px 18px;
        border-radius: 17px;
    }

    .staff-detail-avatar {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
        border-radius: 15px;
        font-size: 1.35rem;
    }

    .staff-detail-hero__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .staff-detail-hero__actions > *,
    .staff-detail-hero__actions .primary-btn,
    .staff-detail-hero__actions .secondary-btn,
    .staff-detail-hero__actions .staff-danger-btn,
    .staff-reset-password-form {
        width: 100%;
    }

    .staff-detail-shell .grid-2 {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .staff-detail-shell > .card,
    .staff-detail-shell .grid-2 > .card {
        border-radius: 15px;
    }

    .staff-detail-shell .card > p {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .staff-detail-shell .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .staff-detail-shell .profile-timeline-section--staff {
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .staff-list-shell .uniform-mobile-card-grid {
        grid-template-columns: 1fr;
    }

    .staff-detail-hero__actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   HAVEN FORMS
   ========================================================= */

.haven-form-page,
.staff-form-shell {
    display: grid;
    gap: 18px;
}

/* Staff form hero */

.staff-form-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    overflow: hidden;
    padding: 25px 28px;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #294478 100%
        );
    box-shadow: 0 12px 30px rgba(32, 51, 95, 0.14);
}

.staff-form-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -130px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

.staff-form-hero > * {
    position: relative;
    z-index: 1;
}

.staff-form-kicker {
    display: block;
    margin-bottom: 5px;
    color: rgba(255,255,255,0.68);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.staff-form-hero h1 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 800;
}

.staff-form-hero p {
    margin: 0;
    color: rgba(255,255,255,0.78);
    font-size: 0.86rem;
}

.staff-form-hero .secondary-btn {
    border-color: rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.09);
    color: #ffffff;
}

/* Form cards */

.staff-form-card,
.haven-form-card {
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.haven-form {
    padding: 18px;
}

/* General form fields */

.haven-form .form-group,
.staff-form-card .form-group {
    min-width: 0;
}

.haven-form .form-group label,
.staff-form-card .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #566378;
    font-size: 0.72rem;
    font-weight: 750;
}

.haven-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.haven-form select,
.haven-form textarea,
.staff-form-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.staff-form-card select,
.staff-form-card textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--haven-border-strong);
    border-radius: 10px;
    background: #ffffff;
    color: var(--haven-text);
    font-family: "Nunito Sans", "Segoe UI", Arial, sans-serif;
    font-size: 0.87rem;
    transition:
        border-color var(--haven-transition),
        box-shadow var(--haven-transition),
        background var(--haven-transition);
}

.haven-form textarea,
.staff-form-card textarea {
    min-height: 105px;
    resize: vertical;
    line-height: 1.5;
}

.haven-form input:focus,
.haven-form select:focus,
.haven-form textarea:focus,
.staff-form-card input:focus,
.staff-form-card select:focus,
.staff-form-card textarea:focus {
    outline: none;
    border-color: var(--haven-navy);
    box-shadow: 0 0 0 3px rgba(32, 51, 95, 0.09);
}

.haven-form input:disabled,
.haven-form input:read-only,
.staff-form-card input:disabled,
.staff-form-card input:read-only {
    background: #f3f5f8;
    color: #7b8797;
    cursor: not-allowed;
}

/* Help and errors */

.haven-form small,
.staff-form-card .form-group small {
    display: block;
    margin-top: 5px;
    color: #8793a5;
    font-size: 0.68rem;
    line-height: 1.45;
}

.field-error,
.haven-form .errorlist,
.staff-form-card .errorlist {
    margin: 6px 0 0;
    padding: 0;
    color: #b42318;
    font-size: 0.7rem;
    font-weight: 700;
    list-style: none;
}

.haven-form .alert {
    margin-bottom: 16px;
    padding: 11px 13px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff7f7;
    color: #b42318;
    font-size: 0.76rem;
}

/* Client form grid */

#customer-form .customer-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 18px;
    padding: 0;
}

#customer-form .form-group {
    padding: 0;
    border: 0;
}

#customer-form .customer-info-item--full {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

/* Map */

.customer-location-map {
    width: 100%;
    height: 420px;
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 14px;
    background: #eef1f5;
}

/* Form actions */

.form-actions,
.haven-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--haven-border);
}

/* Staff form */

.staff-form-card {
    padding: 0;
}

.staff-form-card .portal-form {
    padding: 18px;
}

.staff-form-card .portal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 18px;
}

.staff-password-notice {
    margin-bottom: 20px;
    padding: 14px 15px;
    border: 1px solid #d8dfeb;
    border-radius: 12px;
    background: #f7f9fc;
    color: #45536a;
}

.staff-password-notice > strong {
    display: block;
    margin-bottom: 4px;
    color: var(--haven-navy);
    font-size: 0.8rem;
    font-weight: 800;
}

.staff-password-notice p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
}

.staff-password-notice small {
    display: block;
    margin-top: 5px;
    color: #7e8999;
    font-size: 0.7rem;
}

.staff-colour-section {
    margin-top: 20px;
    padding: 17px;
    border: 1px solid var(--haven-border);
    border-radius: 13px;
    background: #fafbfd;
}

.haven-form-section-head {
    margin-bottom: 13px;
}

.haven-form-section-head h2 {
    margin: 0 0 3px;
    color: var(--haven-navy);
    font-size: 0.9rem;
    font-weight: 750;
}

.haven-form-section-head p {
    margin: 0;
    color: var(--haven-muted);
    font-size: 0.72rem;
}

.staff-colour-section .colour-grid {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

.staff-colour-section .colour-option {
    position: relative;
    cursor: pointer;
}

.staff-colour-section .colour-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.staff-colour-section .colour-option span {
    display: block;
    width: 34px;
    height: 34px;
    border: 3px solid #ffffff;
    border-radius: 10px;
    box-shadow: 0 0 0 1px #d2d9e4;
    transition:
        transform var(--haven-transition),
        box-shadow var(--haven-transition);
}

.staff-colour-section .colour-option:hover span {
    transform: translateY(-2px);
}

.staff-colour-section .colour-option input:checked + span {
    box-shadow:
        0 0 0 3px #ffffff,
        0 0 0 5px var(--haven-navy);
}

/* Checkbox rows */

.staff-form-card .portal-checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--haven-border);
    border-radius: 10px;
    background: #fafbfd;
}

.staff-form-card .portal-checkbox-row input {
    width: 17px;
    height: 17px;
    margin: 0;
}

.staff-form-card .portal-checkbox-row label {
    margin: 0;
}

/* Responsive */

@media (max-width: 760px) {
    .staff-form-shell,
    .haven-form-page {
        gap: 14px;
    }

    .staff-form-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 20px 18px;
        border-radius: 17px;
    }

    .staff-form-hero .secondary-btn {
        width: 100%;
    }

    .staff-form-card,
    .haven-form-card {
        border-radius: 15px;
    }

    .haven-form,
    .staff-form-card .portal-form {
        padding: 15px;
    }

    #customer-form .customer-info-grid,
    .staff-form-card .portal-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #customer-form .customer-info-item--full {
        grid-column: auto;
    }

    .customer-location-map {
        height: 320px;
    }

    .form-actions,
    .haven-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions .primary-btn,
    .form-actions .secondary-btn,
    .haven-form-actions .primary-btn,
    .haven-form-actions .secondary-btn {
        width: 100%;
    }
}

/* =========================================================
   HAVEN AVAILABILITY
   ========================================================= */

.availability-page-shell,
.time-off-shell {
    display: grid;
    gap: 18px;
}

/* Availability headers */
.availability-page-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    overflow: hidden;
    margin-bottom: 18px;
    padding: 24px 27px;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #294478 100%
        );
    box-shadow: 0 12px 30px rgba(32, 51, 95, 0.14);
}

.availability-page-header::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -130px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.availability-page-header > * {
    position: relative;
    z-index: 1;
}

.availability-page-header h1 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 800;
}

.availability-page-header .availability-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.84rem;
}

/* Legend */
.availability-legend,
.haven-pass3-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.availability-legend .legend-item,
.haven-pass3-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 29px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.90);
    font-size: 0.68rem;
    font-weight: 700;
}

.legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 3px;
}

.legend-available {
    background: #86c79e;
}

.legend-unavailable {
    background: #d5dbe3;
}

.legend-shift {
    background: #516b9b;
}

.legend-leave {
    background: #dfbd68;
}

.legend-conflict {
    background: #d97777;
}

/* Availability cards */
.availability-card,
.availability-team-card,
.availability-page-shell .portal-card,
.availability-page-shell .card {
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--haven-border);
    border-radius: 17px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.availability-team-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--haven-border);
    background: #fbfcfe;
}

.availability-team-header h2 {
    margin: 0;
    color: var(--haven-navy);
    font-size: 0.95rem;
    font-weight: 750;
}

/* Toolbar */
.availability-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.availability-card > form > .availability-toolbar {
    padding: 15px 17px 0;
}

.availability-toolbar.bottom-toolbar {
    justify-content: flex-end;
    margin: 0;
    padding: 15px 17px;
    border-top: 1px solid var(--haven-border);
    background: #fbfcfe;
}

/* Mobile instructional tip */
.mobile-grid-tip {
    margin: 0 17px 13px;
    padding: 9px 11px;
    border: 1px solid var(--haven-border);
    border-radius: 10px;
    background: #f7f9fc;
    color: var(--haven-muted);
    font-size: 0.72rem;
}

/* Availability grid */
.availability-grid-wrap {
    overflow: auto;
    border-top: 1px solid var(--haven-border);
    background: #ffffff;
}

.availability-card .availability-grid-wrap {
    border-top: 0;
}

.availability-grid {
    width: 100%;
    min-width: 760px;
    border-spacing: 0;
    border-collapse: separate;
    table-layout: fixed;
}

.availability-grid th,
.availability-grid td {
    box-sizing: border-box;
}

.availability-grid thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 42px;
    padding: 7px 5px;
    border-right: 1px solid #e8ecf2;
    border-bottom: 1px solid var(--haven-border);
    background: #f6f8fb;
    color: #5c697c;
    font-size: 0.68rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.availability-grid .time-column {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 72px;
    min-width: 72px;
    background: #f7f9fc;
    color: #778397;
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
}

.availability-grid thead .time-column {
    z-index: 4;
}

.availability-grid tbody td {
    height: 19px;
    border-right: 1px solid #edf0f4;
    border-bottom: 1px solid #edf0f4;
}

.availability-cell {
    position: relative;
    cursor: pointer;
    transition:
        background 0.08s ease,
        box-shadow 0.08s ease;
}

.availability-cell.is-unavailable {
    background: #f2f4f7;
}

.availability-cell.is-available {
    background: #dff1e5;
}

.availability-cell.readonly-cell {
    cursor: default;
}

.availability-cell.has-shift {
    box-shadow: inset 0 0 0 2px #516b9b;
}

.availability-cell.has-leave {
    background: #f7ebc9;
}

.availability-cell.is-conflict {
    background: #f6d8d8;
    box-shadow: inset 0 0 0 2px #be5555;
}

.availability-cell.is-outside-month {
    opacity: 0.34;
}

.availability-cell.hover-row,
.availability-cell.hover-col {
    filter: brightness(0.96);
}

.availability-date-label {
    margin-top: 2px;
    color: #8e99a9;
    font-size: 0.61rem;
    font-weight: 650;
}

.availability-month-week-label {
    padding: 12px 17px;
    border-bottom: 1px solid var(--haven-border);
    background: #fbfcfe;
    color: var(--haven-navy);
    font-size: 0.78rem;
    font-weight: 750;
}

/* Availability filter cards */
.availability-page-shell .haven-pass3-filter-form,
.availability-page-shell .filter-form {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 18px;
}

.availability-page-shell .form-row,
.availability-page-shell .form-group {
    min-width: 210px;
}

.availability-page-shell label {
    display: block;
    margin-bottom: 5px;
    color: #59667a;
    font-size: 0.71rem;
    font-weight: 750;
}

.availability-page-shell select,
.availability-page-shell input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid var(--haven-border-strong);
    border-radius: 10px;
    background: #ffffff;
    font-family: inherit;
}

/* =========================================================
   HAVEN TIME OFF
   ========================================================= */

/* Hero */
.time-off-shell .haven-pass3-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    overflow: hidden;
    padding: 24px 27px;
    border: 0;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #294478 100%
        );
    box-shadow: 0 12px 30px rgba(32, 51, 95, 0.14);
}

.time-off-shell .haven-pass3-header::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -130px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

.time-off-shell .haven-pass3-header > * {
    position: relative;
    z-index: 1;
}

.time-off-shell .page-kicker {
    margin: 0 0 5px;
    color: rgba(255,255,255,0.67);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.time-off-shell .haven-pass3-header h1 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 800;
}

.time-off-shell .haven-pass3-header > div > p:last-child {
    margin: 0;
    color: rgba(255,255,255,0.78);
    font-size: 0.84rem;
}

.time-off-shell .haven-pass3-header .secondary-btn {
    border-color: rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.09);
    color: #ffffff;
}

.time-off-shell .haven-pass3-header .primary-btn {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--haven-navy);
}

/* Time Off cards */
.time-off-shell .haven-pass3-card {
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 1px solid var(--haven-border);
    border-radius: 17px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.time-off-shell .haven-pass3-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--haven-border);
    background: #fbfcfe;
}

.time-off-shell .section-kicker {
    margin: 0 0 2px;
    color: #8a95a5;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.time-off-shell .haven-pass3-card-header h2 {
    margin: 0 0 3px;
    color: var(--haven-navy);
    font-size: 0.96rem;
    font-weight: 750;
}

.time-off-shell .haven-pass3-card-header p:last-child {
    margin: 0;
    color: var(--haven-muted);
    font-size: 0.73rem;
}

/* Filters */
.time-off-shell .haven-pass3-filter-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    padding: 17px 18px;
}

.time-off-shell .form-group label {
    display: block;
    margin-bottom: 5px;
    color: #59667a;
    font-size: 0.7rem;
    font-weight: 750;
}

.time-off-shell input:not([type="checkbox"]):not([type="radio"]),
.time-off-shell select,
.time-off-shell textarea {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid var(--haven-border-strong);
    border-radius: 10px;
    background: #ffffff;
    color: var(--haven-text);
    font-family: inherit;
    font-size: 0.84rem;
}

.time-off-shell textarea {
    min-height: 110px;
    resize: vertical;
}

.time-off-shell input:focus,
.time-off-shell select:focus,
.time-off-shell textarea:focus {
    outline: none;
    border-color: var(--haven-navy);
    box-shadow: 0 0 0 3px rgba(32,51,95,0.09);
}

.time-off-shell .haven-pass3-filter-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Request table */
.time-off-shell .haven-pass3-table-wrap {
    margin: 16px 18px 18px;
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 13px;
}

.time-off-shell .haven-pass3-table {
    width: 100%;
    border-collapse: collapse;
}

.time-off-shell .haven-pass3-table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--haven-border);
    background: #f6f8fb;
    color: #5d697c;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-align: left;
    text-transform: uppercase;
}

.time-off-shell .haven-pass3-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf1f5;
    color: #596578;
    font-size: 0.77rem;
}

.time-off-shell .haven-pass3-table tbody tr:last-child td {
    border-bottom: 0;
}

.time-off-shell .haven-pass3-table tbody tr:hover {
    background: #f8fafc;
}

/* Status pills */
.time-off-shell .pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 800;
    white-space: nowrap;
}

.time-off-shell .status-pending {
    border: 1px solid #f4d89b;
    background: #fff9e9;
    color: #8a5a00;
}

.time-off-shell .status-approved {
    border: 1px solid #b9dfc6;
    background: #edf8f1;
    color: #24663b;
}

.time-off-shell .status-declined,
.time-off-shell .status-rejected {
    border: 1px solid #efc1c1;
    background: #fff1f1;
    color: #9d3333;
}

.time-off-shell .status-cancelled {
    border: 1px solid #d6dbe3;
    background: #f3f5f7;
    color: #657184;
}

/* Detail layout */
.time-off-shell .haven-pass3-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.time-off-shell .haven-pass3-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 8px 18px 18px;
}

.time-off-shell .haven-pass3-detail-item {
    padding: 13px 14px;
    border-bottom: 1px solid #edf1f5;
}

.time-off-shell .haven-pass3-detail-item:nth-child(even) {
    border-left: 1px solid #edf1f5;
}

.time-off-shell .haven-pass3-detail-item.full {
    grid-column: 1 / -1;
    border-left: 0;
}

.time-off-shell .haven-pass3-detail-item span {
    display: block;
    margin-bottom: 3px;
    color: #8a95a5;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.time-off-shell .haven-pass3-detail-item strong {
    display: block;
    color: #4e5a6d;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.5;
}

.time-off-shell .haven-pass3-sticky-card {
    position: sticky;
    top: 18px;
}

.time-off-shell .haven-pass3-actions {
    display: flex;
    gap: 8px;
    padding: 16px 18px 18px;
}

.time-off-shell .haven-pass3-actions.stacked {
    flex-direction: column;
}

.time-off-shell .haven-pass3-actions.stacked > * {
    width: 100%;
}

/* Partial-day toggle */
.time-off-shell .haven-pass3-toggle-card {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 16px 18px 0;
    padding: 13px 14px;
    border: 1px solid var(--haven-border);
    border-radius: 11px;
    background: #f8fafc;
}

.time-off-shell .haven-pass3-toggle-card input {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin-top: 2px;
}

.time-off-shell .haven-pass3-toggle-card label {
    margin: 0;
    color: var(--haven-navy);
    font-weight: 750;
}

.time-off-shell .haven-pass3-toggle-card p {
    margin: 3px 0 0;
    color: var(--haven-muted);
    font-size: 0.71rem;
}

/* Request forms */
.time-off-shell .haven-pass3-form-grid {
    padding: 17px 18px;
}

.time-off-shell .haven-pass3-form-grid + .haven-pass3-form-grid {
    padding-top: 14px;
}

/* Confirmation */
.time-off-shell .haven-pass3-confirm-card {
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
}

.time-off-shell .centered {
    text-align: center;
    justify-content: center;
}

.time-off-shell .centered-actions {
    justify-content: center;
}

/* =========================================================
   AVAILABILITY + TIME OFF RESPONSIVE
   ========================================================= */

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

    .availability-legend {
        justify-content: flex-start;
    }

    .time-off-shell .haven-pass3-layout {
        grid-template-columns: 1fr;
    }

    .time-off-shell .haven-pass3-sticky-card {
        position: static;
    }

    .time-off-shell .haven-pass3-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .availability-page-header,
    .time-off-shell .haven-pass3-header {
        align-items: stretch;
        flex-direction: column;
        padding: 20px 18px;
        border-radius: 17px;
    }

    .availability-page-header {
        margin-bottom: 14px;
    }

    .availability-legend,
    .haven-pass3-legend {
        justify-content: flex-start;
    }

    .availability-toolbar {
        align-items: stretch;
    }

    .availability-toolbar > * {
        flex: 1 1 auto;
    }

    .availability-grid {
        min-width: 700px;
    }

    .availability-grid .time-column {
        width: 62px;
        min-width: 62px;
    }

    .time-off-shell {
        gap: 14px;
    }

    .time-off-shell .haven-pass3-header .header-actions,
    .time-off-shell .haven-pass3-header .header-actions > * {
        width: 100%;
    }

    .time-off-shell .haven-pass3-filter-form {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .time-off-shell .haven-pass3-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .time-off-shell .haven-pass3-filter-actions > * {
        width: 100%;
    }

    .time-off-shell .haven-pass3-detail-grid {
        grid-template-columns: 1fr;
        padding: 7px 14px 14px;
    }

    .time-off-shell .haven-pass3-detail-item,
    .time-off-shell .haven-pass3-detail-item:nth-child(even) {
        border-left: 0;
    }

    .time-off-shell .haven-pass3-detail-item.full {
        grid-column: auto;
    }

    .time-off-shell .haven-pass3-form-grid {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .time-off-shell .haven-pass3-form-grid .full-width {
        grid-column: auto;
    }

    .time-off-shell .haven-pass3-table-wrap {
        margin: 14px;
        border: 0;
        overflow: visible;
    }

    .time-off-shell .haven-pass3-mobile-table,
    .time-off-shell .haven-pass3-mobile-table tbody,
    .time-off-shell .haven-pass3-mobile-table tr,
    .time-off-shell .haven-pass3-mobile-table td {
        display: block;
        width: 100%;
    }

    .time-off-shell .haven-pass3-mobile-table thead {
        display: none;
    }

    .time-off-shell .haven-pass3-mobile-table tr {
        margin-bottom: 10px;
        overflow: hidden;
        border: 1px solid var(--haven-border);
        border-radius: 13px;
        background: #ffffff;
        box-shadow: var(--haven-shadow-sm);
    }

    .time-off-shell .haven-pass3-mobile-table td {
        display: grid;
        grid-template-columns: 100px minmax(0, 1fr);
        gap: 10px;
        padding: 9px 12px;
        border-bottom: 1px solid #edf1f5;
    }

    .time-off-shell .haven-pass3-mobile-table td::before {
        content: attr(data-label);
        color: #8b96a6;
        font-size: 0.67rem;
        font-weight: 750;
    }

    .time-off-shell .haven-pass3-mobile-table td:last-child {
        border-bottom: 0;
    }
}

/* =========================================================
   HAVEN SERVICE NOTES
   ========================================================= */

.service-notes-shell,
.service-note-detail-shell {
    display: grid;
    gap: 18px;
}

/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */

.service-notes-hero,
.service-note-detail-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: 25px 28px;
    border: 0;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #294478 100%
        );
    box-shadow: 0 12px 30px rgba(32, 51, 95, 0.14);
}

.service-notes-hero::after,
.service-note-detail-hero::after {
    content: "";
    position: absolute;
    right: -95px;
    top: -135px;
    width: 310px;
    height: 310px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.045);
    pointer-events: none;
}

.service-notes-hero > *,
.service-note-detail-hero > * {
    position: relative;
    z-index: 1;
}

.service-notes-hero .eyebrow,
.service-note-detail-hero .eyebrow {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.service-notes-hero h1,
.service-note-detail-hero h1 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 800;
}

.service-notes-hero p,
.service-note-detail-hero p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.79);
    font-size: 0.86rem;
    line-height: 1.5;
}

.service-notes-hero .secondary-btn,
.service-note-detail-hero .secondary-btn {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.service-note-detail-hero .primary-btn {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--haven-navy);
}

/* ---------------------------------------------------------
   SUMMARY CARDS
   --------------------------------------------------------- */

.service-note-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 240px));
    gap: 12px;
}

.service-note-summary {
    position: relative;
    overflow: hidden;
    padding: 17px 18px;
    border: 1px solid var(--haven-border);
    border-radius: 15px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.service-note-summary::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--haven-navy);
}

.service-note-summary:first-child::before {
    background: #c97a18;
}

.service-note-summary:nth-child(2)::before {
    background: #3d7d54;
}

.service-note-summary span {
    display: block;
    margin-bottom: 5px;
    color: var(--haven-muted);
    font-size: 0.72rem;
    font-weight: 750;
}

.service-note-summary strong {
    display: block;
    color: var(--haven-navy);
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
}

.service-note-summary:first-child strong {
    color: #a75b0b;
}

.service-note-summary:nth-child(2) strong {
    color: #28623e;
}

/* ---------------------------------------------------------
   CARDS
   --------------------------------------------------------- */

.service-notes-shell .health-card,
.service-note-detail-shell .health-card {
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 1px solid var(--haven-border);
    border-radius: 17px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.service-notes-shell .health-card-head,
.service-note-detail-shell .health-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--haven-border);
    background: #fbfcfe;
}

.service-notes-shell .health-card-head h3,
.service-note-detail-shell .health-card-head h3 {
    margin: 0 0 3px;
    color: var(--haven-navy);
    font-size: 0.97rem;
    font-weight: 750;
}

.service-notes-shell .health-card-head p,
.service-note-detail-shell .health-card-head p {
    margin: 0;
    color: var(--haven-muted);
    font-size: 0.73rem;
    line-height: 1.45;
}

/* ---------------------------------------------------------
   FILTERS
   --------------------------------------------------------- */

.service-notes-shell .health-card > form {
    padding: 17px 18px;
}

.service-note-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    gap: 14px;
}

.service-notes-shell .form-group label {
    display: block;
    margin-bottom: 5px;
    color: #59667a;
    font-size: 0.7rem;
    font-weight: 750;
}

.service-notes-shell .form-input {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid var(--haven-border-strong);
    border-radius: 10px;
    background: #ffffff;
    color: var(--haven-text);
    font-family: inherit;
    font-size: 0.82rem;
}

.service-notes-shell .form-input:focus {
    outline: none;
    border-color: var(--haven-navy);
    box-shadow: 0 0 0 3px rgba(32, 51, 95, 0.09);
}

.service-note-filter-actions {
    justify-content: flex-end;
    margin-top: 16px;
}

/* ---------------------------------------------------------
   SERVICE NOTE TABLES
   --------------------------------------------------------- */

.service-note-section-spaced {
    margin: 0;
}

.service-notes-shell .health-table-wrap,
.service-note-detail-shell .health-table-wrap {
    overflow-x: auto;
}

.service-notes-shell .health-table,
.service-note-detail-shell .health-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
}

.service-notes-shell .health-table th,
.service-note-detail-shell .health-table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--haven-border);
    background: #f6f8fb;
    color: #5c697c;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.service-notes-shell .health-table td,
.service-note-detail-shell .health-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf1f5;
    color: #596578;
    font-size: 0.76rem;
    vertical-align: middle;
}

.service-notes-shell .health-table tbody tr:last-child td,
.service-note-detail-shell .health-table tbody tr:last-child td {
    border-bottom: 0;
}

.service-notes-shell .health-table tbody tr:hover,
.service-note-detail-shell .health-table tbody tr:hover {
    background: #f8fafc;
}

/* ---------------------------------------------------------
   STATUS
   --------------------------------------------------------- */

.service-note-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 800;
    white-space: nowrap;
}

.service-note-status--required {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #a8500c;
}

.service-note-status--complete {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.service-note-table-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

/* =========================================================
   SERVICE NOTE DETAIL
   ========================================================= */

.service-note-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 18px;
}

/* Summary information */

.service-note-detail-shell .info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 7px 18px 18px;
}

.service-note-detail-shell .info-item {
    min-width: 0;
    padding: 13px 14px;
    border-bottom: 1px solid #edf1f5;
}

.service-note-detail-shell .info-item:nth-child(even) {
    border-left: 1px solid #edf1f5;
}

.service-note-detail-shell .info-item span {
    display: block;
    margin-bottom: 3px;
    color: #8994a5;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.service-note-detail-shell .info-item strong {
    display: block;
    color: #4e5a6d;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* General Notes */

.service-note-detail-shell .note-body {
    padding: 18px;
    color: #566276;
    font-size: 0.8rem;
    line-height: 1.65;
}

.service-note-detail-shell .note-body p {
    margin-top: 0;
}

.service-note-detail-shell .note-body p:last-child {
    margin-bottom: 0;
}

/* ---------------------------------------------------------
   PHOTOS
   --------------------------------------------------------- */

.service-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    padding: 17px 18px 19px;
}

.service-photo-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 13px;
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--haven-shadow-sm);
    transition:
        transform var(--haven-transition),
        border-color var(--haven-transition),
        box-shadow var(--haven-transition);
}

.service-photo-card:hover {
    transform: translateY(-2px);
    border-color: #cdd6e2;
    box-shadow: var(--haven-shadow-md);
}

.service-photo-card img {
    display: block;
    width: 100%;
    height: 175px;
    object-fit: cover;
    background: #eef1f5;
}

.service-photo-card span {
    display: block;
    overflow: hidden;
    padding: 9px 11px;
    color: #677387;
    font-size: 0.7rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Empty states inside detail cards */

.service-note-detail-shell .health-card > .empty-state {
    padding: 26px 18px;
}

/* =========================================================
   SERVICE NOTES RESPONSIVE
   ========================================================= */

@media (max-width: 950px) {
    .service-note-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-note-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .service-notes-shell,
    .service-note-detail-shell {
        gap: 14px;
    }

    .service-notes-hero,
    .service-note-detail-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 20px 18px;
        border-radius: 17px;
    }

    .service-notes-hero .health-hero-panel-actions,
    .service-note-detail-hero .health-hero-panel-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .service-notes-hero .health-hero-panel-actions > *,
    .service-note-detail-hero .health-hero-panel-actions > * {
        width: 100%;
    }

    .service-note-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .service-note-filter-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .service-note-filter-actions > * {
        width: 100%;
    }

    .service-note-detail-shell .info-grid {
        grid-template-columns: 1fr;
        padding: 6px 14px 14px;
    }

    .service-note-detail-shell .info-item:nth-child(even) {
        border-left: 0;
    }

    .service-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 14px;
    }

    .service-photo-card img {
        height: 145px;
    }
}

@media (max-width: 480px) {
    .service-note-summary-grid {
        grid-template-columns: 1fr;
    }

    .service-photo-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   HAVEN GLOBAL TYPOGRAPHY SIZE
   ========================================================= */

html {
    font-size: 17px;
}

/* Keep form controls comfortably readable */
input,
select,
textarea,
button {
    font-family: "Nunito Sans", "Segoe UI", Arial, sans-serif;
}

/* Prevent tiny supporting text */
small,
.muted-text {
    line-height: 1.45;
}

/* Mobile form controls stay large enough to avoid iPhone zoom */
@media (max-width: 760px) {
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* =========================================================
   DASHBOARD CLICKABLE STATS
   ========================================================= */

.dashboard-stat-link {
    position: relative;
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform var(--haven-transition),
        border-color var(--haven-transition),
        box-shadow var(--haven-transition),
        background var(--haven-transition);
}

.dashboard-stat-link:hover {
    transform: translateY(-3px);
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(32, 51, 95, 0.11);
}

.dashboard-stat-link:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(32, 51, 95, 0.12),
        0 14px 28px rgba(32, 51, 95, 0.11);
}

.dashboard-stat-link em {
    display: block;
    margin-top: auto;
    padding-top: 12px;
    color: var(--haven-navy);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
}

.dashboard-stat-link:hover em {
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 760px) {
    .dashboard-stat-link {
        min-height: 150px;
    }
}

/* =========================================================
   SHIFT SERVICE NOTES MODAL
   ========================================================= */

.haven-service-note-modal {
    width: min(820px, calc(100vw - 28px));
    max-height: 92vh;
    overflow-y: auto;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 22px;
    background: #f5f7fa;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

/* Header */

.haven-service-note-modal .service-note-modal-head {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 23px 24px;
    border: 0;
    border-radius: 22px 22px 0 0;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #294478 100%
        );
}

.haven-service-note-modal .service-note-modal-head::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -115px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}

.haven-service-note-modal .service-note-modal-head > * {
    position: relative;
    z-index: 1;
}

.haven-service-note-modal .service-note-kicker {
    display: block;
    margin-bottom: 5px;
    color: rgba(255,255,255,0.68);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.haven-service-note-modal .service-note-modal-head h2 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
}

.haven-service-note-modal .service-note-modal-head p {
    margin: 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.82rem;
    line-height: 1.5;
}

/* Shift context */

.service-note-context-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1px;
    margin: 0;
    border-bottom: 1px solid var(--haven-border);
    background: var(--haven-border);
}

.service-note-context-item {
    min-width: 0;
    padding: 13px 16px;
    background: #ffffff;
}

.service-note-context-item span {
    display: block;
    margin-bottom: 3px;
    color: #8a95a5;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.service-note-context-item strong {
    display: block;
    overflow: hidden;
    color: #4b586c;
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.4;
    text-overflow: ellipsis;
}

/* Clock-out status */

.service-note-required-banner {
    position: relative;
    margin: 17px 18px 0;
    padding: 13px 15px 13px 42px;
    border: 1px solid #bed9c8;
    border-radius: 12px;
    background: #f1f8f3;
    color: #365b43;
}

.service-note-required-banner::before {
    content: "✓";
    position: absolute;
    left: 14px;
    top: 14px;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: #d9eee0;
    color: #27613b;
    font-size: 0.72rem;
    font-weight: 900;
}

.service-note-required-banner strong {
    display: block;
    margin-bottom: 3px;
    color: #27553a;
    font-size: 0.79rem;
    font-weight: 800;
}

.service-note-required-banner span {
    display: block;
    color: #5c7464;
    font-size: 0.73rem;
    line-height: 1.45;
}

/* Main form */

.service-note-form {
    padding: 18px;
}

.service-note-form-alert {
    margin-bottom: 16px;
}

.service-note-section {
    margin-bottom: 15px;
    padding: 17px;
    border: 1px solid var(--haven-border);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

.service-note-section:last-of-type {
    margin-bottom: 0;
}

.service-note-section h3 {
    margin: 0 0 4px;
    color: var(--haven-navy);
    font-size: 0.92rem;
    font-weight: 800;
}

.service-note-section > p {
    margin: 0 0 15px;
    color: var(--haven-muted);
    font-size: 0.73rem;
    line-height: 1.5;
}

/* Fields */

.service-note-field {
    margin-bottom: 16px;
}

.service-note-field:last-child {
    margin-bottom: 0;
}

.service-note-field > label {
    display: block;
    margin-bottom: 6px;
    color: #566378;
    font-size: 0.74rem;
    font-weight: 800;
}

.service-note-required {
    margin-left: 2px;
    color: #b42318;
}

.service-note-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.service-note-form select,
.service-note-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--haven-border-strong);
    border-radius: 10px;
    background: #ffffff;
    color: var(--haven-text);
    font-family: inherit;
    font-size: 0.86rem;
    transition:
        border-color var(--haven-transition),
        box-shadow var(--haven-transition);
}

.service-note-form textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.55;
}

.service-note-form input:focus,
.service-note-form select:focus,
.service-note-form textarea:focus {
    outline: none;
    border-color: var(--haven-navy);
    box-shadow: 0 0 0 3px rgba(32,51,95,0.09);
}

.service-note-form .task-field-help {
    display: block;
    margin-top: 5px;
    color: #8994a5;
    font-size: 0.69rem;
    line-height: 1.45;
}

.service-note-form .field-error {
    margin-top: 5px;
    color: #b42318;
    font-size: 0.7rem;
    font-weight: 750;
}

/* Checkbox / radio answer groups */

.service-note-form ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-note-form ul li label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid var(--haven-border);
    border-radius: 10px;
    background: #fafbfd;
    color: #566378;
    cursor: pointer;
}

.service-note-form input[type="checkbox"],
.service-note-form input[type="radio"] {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    accent-color: #20335f;
}

/* Photo upload */

.service-photo-upload {
    display: block;
    width: 100%;
    min-height: 74px;
    padding: 17px;
    border: 1px dashed #aeb9c8;
    border-radius: 12px;
    background: #f8fafc;
    color: #667386;
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
}

.service-photo-upload:hover {
    border-color: #7f8da1;
    background: #f5f7fa;
}

.service-photo-upload::file-selector-button {
    margin-right: 10px;
    padding: 8px 11px;
    border: 0;
    border-radius: 8px;
    background: var(--haven-navy);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

/* Actions */

.service-note-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 17px;
    padding-top: 16px;
    border-top: 1px solid var(--haven-border);
}

.service-note-actions .primary-btn {
    min-width: 240px;
}

/* Modal scrollbar */

.haven-service-note-modal {
    scrollbar-width: thin;
    scrollbar-color: #bcc5d1 transparent;
}

.haven-service-note-modal::-webkit-scrollbar {
    width: 8px;
}

.haven-service-note-modal::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #bcc5d1;
}

/* =========================================================
   SERVICE NOTE MODAL RESPONSIVE
   ========================================================= */

@media (max-width: 760px) {
    .haven-service-note-modal {
        width: calc(100vw - 14px);
        max-height: 96vh;
        border-radius: 17px;
    }

    .haven-service-note-modal .service-note-modal-head {
        padding: 19px 17px;
        border-radius: 17px 17px 0 0;
    }

    .haven-service-note-modal .service-note-modal-head h2 {
        font-size: 1.22rem;
    }

    .service-note-context-grid {
        grid-template-columns: 1fr;
    }

    .service-note-context-item {
        padding: 10px 14px;
    }

    .service-note-required-banner {
        margin: 14px 14px 0;
    }

    .service-note-form {
        padding: 14px;
    }

    .service-note-section {
        padding: 14px;
        border-radius: 12px;
    }

    .service-note-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .service-note-actions > *,
    .service-note-actions .primary-btn {
        width: 100%;
        min-width: 0;
    }

    .service-note-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    .service-note-form select,
    .service-note-form textarea {
        font-size: 16px;
    }
}

/* =========================================================
   ROSTER REPORTS
   ========================================================= */

.roster-report-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 24px 26px;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #294478 100%
        );
    box-shadow: 0 15px 35px rgba(32, 51, 95, 0.16);
}

.roster-report-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -135px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.045);
    pointer-events: none;
}

.roster-report-hero__copy,
.roster-report-hero__actions {
    position: relative;
    z-index: 1;
}

.roster-report-kicker {
    display: block;
    margin-bottom: 5px;
    color: rgba(255,255,255,0.66);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.roster-report-hero h1 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: 1.55rem;
    font-weight: 800;
}

.roster-report-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255,255,255,0.78);
    font-size: 0.82rem;
    line-height: 1.5;
}

.roster-report-hero__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.roster-report-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid rgba(255,255,255,0.20);
    border-radius: 9px;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        background var(--haven-transition),
        transform var(--haven-transition);
}

.roster-report-hero-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.15);
    color: #ffffff;
}

/* Filters */

.roster-report-filter-card {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--haven-border);
    border-radius: 16px;
    box-shadow: var(--haven-shadow-sm);
}

.roster-report-filter-card .section-header {
    margin-bottom: 14px;
}

.roster-report-filter-card .section-title {
    margin: 0;
    color: var(--haven-navy);
    font-size: 0.92rem;
    font-weight: 800;
}

.roster-report-filter-form .form-grid {
    gap: 12px;
}

.roster-report-filter-form label {
    color: #59667a;
    font-size: 0.72rem;
    font-weight: 800;
}

.roster-report-filter-form input,
.roster-report-filter-form select {
    min-height: 43px;
    border-radius: 9px;
}

.roster-report-filter-form .form-actions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--haven-border);
}

/* =========================================================
   REPORT SUMMARY CARDS
   ========================================================= */

.roster-variance-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 10px;
}

.roster-variance-card {
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid #dfe4eb;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 4px 13px rgba(32,51,95,0.045);
}

.roster-variance-card span:first-child {
    display: block;
    margin-bottom: 5px;
    color: #8590a0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.roster-variance-card > strong {
    display: block;
    color: #20335f;
    font-size: 1.24rem;
    font-weight: 800;
}

.premium-stats-row.roster-travel-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 20px !important;
}

.roster-travel-stats .stat-card {
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid #dfe4eb;
    border-radius: 13px;
    background: #f8fafc;
    box-shadow: none;
}

.roster-travel-stats .stat-card h3 {
    margin: 0 0 6px;
    color: #7c8798;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.roster-travel-stats .stat-card p {
    margin: 0 0 3px;
    color: #20335f;
    font-size: 1.18rem;
    font-weight: 800;
}

.roster-travel-stats .stat-card small {
    color: #8994a5;
    font-size: 0.67rem;
}

/* Variance badges */

.roster-variance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 55px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 800;
    white-space: nowrap;
}

.roster-variance-badge.over {
    background: #fbe9e9;
    color: #9b3636;
}

.roster-variance-badge.under {
    background: #e9eef8;
    color: #385487;
}

.roster-variance-badge.even {
    background: #e9f4ec;
    color: #39704b;
}

.roster-variance-badge.missing {
    background: #eef1f4;
    color: #697586;
}

.roster-clock-missing {
    color: #ad3f3f;
    font-weight: 800;
}

.roster-breakdown {
    margin-top: 5px;
    color: #8792a2;
    font-size: 0.67rem;
    line-height: 1.45;
}

/* =========================================================
   EMPLOYEE SUMMARY TABLE
   ========================================================= */

.roster-employee-summary-card {
    margin-top: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--haven-border);
    border-radius: 16px;
    box-shadow: var(--haven-shadow-sm);
}

.roster-employee-summary-card > .section-header {
    margin: 0;
    padding: 16px 18px;
    border-bottom: 1px solid var(--haven-border);
    background: #f8f9fb;
}

.roster-employee-summary-card .section-title {
    margin: 0 0 3px;
    color: #20335f;
    font-size: 0.92rem;
    font-weight: 800;
}

.roster-employee-summary-card .section-header p {
    margin: 0;
    color: #7e8999;
    font-size: 0.72rem;
    line-height: 1.4;
}

.roster-employee-summary-card .premium-table-shell {
    border: 0;
    border-radius: 0;
}

.roster-employee-summary-card .premium-table-wrap {
    overflow-x: auto;
}

.roster-report-table {
    width: 100%;
    min-width: 1850px;
}

.roster-report-table th {
    padding: 10px 9px;
    background: #f4f6f9;
    color: #697587;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    white-space: nowrap;
}

.roster-report-table td {
    padding: 10px 9px;
    color: #536075;
    font-size: 0.72rem;
    vertical-align: top;
}

.roster-report-table tbody tr {
    cursor: pointer;
    transition: background var(--haven-transition);
}

.roster-report-table tbody tr:hover td {
    background: #f7f9fc;
}

/* Keep employee identity visible when scrolling sideways */

.roster-report-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 4;
    min-width: 175px;
    background: #eef1f5;
    box-shadow: 1px 0 0 #dfe4eb;
}

.roster-report-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 175px;
    background: #ffffff;
    box-shadow: 1px 0 0 #e4e8ee;
}

.roster-report-table tbody tr:hover td:first-child {
    background: #f7f9fc;
}

.employee-summary-row td:first-child strong {
    color: #20335f;
    font-weight: 800;
}

/* =========================================================
   EMPLOYEE CLOCKING MODAL
   ========================================================= */

.roster-clock-modal {
    background: rgba(15,23,42,0.64);
    backdrop-filter: blur(2px);
}

.roster-clock-modal__card {
    overflow: hidden;
    width: calc(100vw - 34px);
    max-height: 92vh;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 19px;
    background: #f6f7f9;
    box-shadow: 0 30px 75px rgba(15,23,42,0.30);
}

.roster-clock-modal__header {
    padding: 18px 20px;
    border: 0;
    background:
        linear-gradient(
            135deg,
            #20335f 0%,
            #294478 100%
        );
}

.roster-clock-modal__header h2 {
    margin: 0 0 3px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
}

.roster-clock-modal__header p {
    margin: 0;
    color: rgba(255,255,255,0.72);
    font-size: 0.73rem;
}

.roster-clock-modal__close {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 9px;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    font-family: inherit;
    font-size: 1.3rem;
}

.roster-clock-modal__close:hover {
    background: rgba(255,255,255,0.15);
}

.roster-clock-modal__body {
    padding: 16px 18px 20px;
}

.roster-clock-modal__summary {
    margin-bottom: 12px;
}

.roster-clock-modal__summary span {
    padding: 6px 10px;
    border: 1px solid #dfe4eb;
    background: #ffffff;
    color: #566378;
    font-size: 0.7rem;
    font-weight: 800;
}

.roster-clock-modal__body .premium-table-shell {
    overflow: hidden;
    border: 1px solid #dfe4eb;
    border-radius: 12px;
    background: #ffffff;
}

.roster-clock-modal__body .premium-table th {
    background: #f4f6f9;
    color: #687486;
    font-family: inherit;
    font-size: 0.61rem;
    font-weight: 850;
    text-transform: uppercase;
}

.roster-clock-modal__body .premium-table td {
    color: #536075;
    font-family: inherit;
    font-size: 0.7rem;
}

.roster-category-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border-radius: 999px;
    background: #edf1f8;
    color: #425b88;
    font-size: 0.65rem;
    font-weight: 800;
}

/* =========================================================
   ROSTER REPORT RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
    .roster-report-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .roster-variance-stats,
    .premium-stats-row.roster-travel-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .roster-report-hero {
        padding: 19px 17px;
        border-radius: 16px;
    }

    .roster-report-hero h1 {
        font-size: 1.3rem;
    }

    .roster-report-hero__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .roster-report-hero-btn {
        width: 100%;
    }

    .roster-variance-stats,
    .premium-stats-row.roster-travel-stats {
        grid-template-columns: 1fr;
    }

    .roster-report-filter-card {
        padding: 14px;
    }

    .roster-clock-modal {
        padding: 6px;
    }

    .roster-clock-modal__card {
        width: 100%;
        max-height: 96vh;
        border-radius: 14px;
    }

    .roster-clock-modal__header {
        padding: 15px;
    }

    .roster-clock-modal__body {
        padding: 11px;
    }
}

/* =========================================================
   ROSTER REPORT - TRAVEL REVIEW
   ========================================================= */

.roster-travel-review {
    overflow: hidden;
    margin-top: 20px;
    border: 1px solid var(--haven-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--haven-shadow-sm);
}

/* Header */

.travel-review-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin: 0;
    padding: 17px 18px;
    border-bottom: 1px solid var(--haven-border);
    background: #f8f9fb;
}

.travel-review-header__copy {
    min-width: 0;
}

.travel-review-kicker {
    display: block;
    margin-bottom: 3px;
    color: #8994a5;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.travel-review-header h2 {
    margin: 0 0 3px;
    color: #20335f;
    font-size: 0.95rem;
    font-weight: 800;
}

.travel-review-header p {
    max-width: 680px;
    margin: 0;
    color: #7c8798;
    font-size: 0.72rem;
    line-height: 1.45;
}

/* Filter buttons */

.travel-review-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.travel-review-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid #d7dee7;
    border-radius: 9px;
    background: #ffffff;
    color: #657184;
    font-size: 0.68rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        background var(--haven-transition),
        border-color var(--haven-transition),
        color var(--haven-transition),
        transform var(--haven-transition);
}

.travel-review-filter:hover {
    transform: translateY(-1px);
    border-color: #aeb9c7;
    background: #f7f9fb;
    color: #20335f;
}

.travel-review-filter.active {
    border-color: #20335f;
    background: #20335f;
    color: #ffffff;
}

/* =========================================================
   TRAVEL SUMMARY
   ========================================================= */

.travel-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
    padding: 14px 18px;
    border-bottom: 1px solid var(--haven-border);
    background: #ffffff;
}

.travel-summary-card {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #dfe4eb;
    border-radius: 11px;
    background: #f8fafc;
}

.travel-summary-card span {
    display: block;
    margin-bottom: 4px;
    color: #8792a2;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.travel-summary-card strong {
    display: block;
    overflow: hidden;
    color: #20335f;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
}

/* Emphasise attention total slightly */

.travel-summary-card:last-child {
    border-color: #ecd8ad;
    background: #fffaf0;
}

.travel-summary-card:last-child strong {
    color: #855e18;
}

/* =========================================================
   TRAVEL TABLE
   ========================================================= */

.travel-table-wrap {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #bcc5d1 transparent;
}

.travel-table-wrap::-webkit-scrollbar {
    height: 8px;
}

.travel-table-wrap::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #bcc5d1;
}

.travel-review-table {
    width: 100%;
    min-width: 1900px;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.travel-review-table th,
.travel-review-table td {
    padding: 9px 9px;
    border-bottom: 1px solid #e8ebef;
    color: #536075;
    font-size: 0.69rem;
    line-height: 1.4;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.travel-review-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f4f6f9;
    color: #687486;
    font-size: 0.61rem;
    font-weight: 850;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.travel-review-table tbody tr {
    transition: background var(--haven-transition);
}

.travel-review-table tbody tr:hover td {
    background: #f8fafc;
}

.travel-review-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Keep date and employee visible while scrolling */

.travel-review-table th:first-child,
.travel-review-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 4;
    width: 95px;
    min-width: 95px;
    background: #ffffff;
    box-shadow: 1px 0 0 #e4e8ee;
}

.travel-review-table th:first-child {
    z-index: 6;
    background: #eef1f5;
}

.travel-review-table th:nth-child(2),
.travel-review-table td:nth-child(2) {
    position: sticky;
    left: 95px;
    z-index: 4;
    min-width: 155px;
    background: #ffffff;
    box-shadow: 1px 0 0 #e4e8ee;
}

.travel-review-table th:nth-child(2) {
    z-index: 6;
    background: #eef1f5;
}

.travel-review-table tbody tr:hover td:first-child,
.travel-review-table tbody tr:hover td:nth-child(2) {
    background: #f8fafc;
}

/* Role */

.travel-review-table td:nth-child(5) strong {
    color: #20335f;
    font-size: 0.67rem;
    font-weight: 850;
}

/* =========================================================
   TRAVEL STATUS
   ========================================================= */

.travel-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 7px;
    border-radius: 999px;
    background: #eaf4ed;
    color: #39704b;
    font-size: 0.63rem;
    font-weight: 800;
    white-space: nowrap;
}

.travel-status.attention {
    background: #fff2da;
    color: #8b6117;
}

.travel-status.awaiting {
    background: #fbe9e9;
    color: #9c3737;
}

.travel-notes {
    display: block;
    max-width: 230px;
    margin-top: 4px;
    color: #808b9b;
    font-size: 0.64rem;
    line-height: 1.4;
    white-space: normal;
}

.travel-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 29px;
    padding: 0 8px;
    border: 1px solid #d7dee7;
    border-radius: 7px;
    background: #ffffff;
    color: #20335f;
    font-size: 0.64rem;
    font-weight: 800;
    text-decoration: none;
}

.travel-open-link:hover {
    border-color: #20335f;
    background: #20335f;
    color: #ffffff;
}

.travel-empty {
    padding: 36px 20px;
    color: #8792a2;
    font-size: 0.76rem;
    text-align: center;
}

/* =========================================================
   TRAVEL REVIEW RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
    .travel-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .travel-review-header {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .travel-review-header {
        padding: 14px;
    }

    .travel-review-filters {
        display: grid;
        grid-template-columns: 1fr;
    }

    .travel-review-filter {
        width: 100%;
    }

    .travel-summary-grid {
        grid-template-columns: 1fr;
        padding: 12px 14px;
    }

    .travel-summary-card {
        padding: 12px;
    }
}

/* =========================================================
   SHIFT DETAIL - CLOCK CORRECTION
   ========================================================= */

.task-clock-edit {
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid #dfe4eb;
    border-radius: 12px;
    background: #ffffff;
}

.task-clock-edit-summary {
    position: relative;
    padding: 11px 38px 11px 13px;
    color: #536075;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition:
        background var(--haven-transition),
        color var(--haven-transition);
}

.task-clock-edit-summary::-webkit-details-marker {
    display: none;
}

.task-clock-edit-summary::after {
    content: "+";
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #7c8798;
    font-size: 1rem;
    font-weight: 700;
}

.task-clock-edit[open] .task-clock-edit-summary::after {
    content: "−";
}

.task-clock-edit-summary:hover {
    background: #f8fafc;
    color: #20335f;
}

.task-clock-edit[open] .task-clock-edit-summary {
    border-bottom: 1px solid #e3e8ee;
    background: #f8fafc;
    color: #20335f;
}

.task-clock-edit-form {
    margin: 0;
    padding: 14px;
    background: #ffffff;
}

.task-clock-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.task-clock-edit-label {
    display: block;
    margin-bottom: 5px;
    color: #59667a;
    font-size: 0.69rem;
    font-weight: 800;
}

.task-clock-edit-input {
    width: 100%;
    min-height: 41px;
    box-sizing: border-box;
}

.task-clock-edit-help {
    margin: 9px 0 12px;
    color: #818c9c;
    font-size: 0.68rem;
    line-height: 1.45;
}

/* =========================================================
   SHIFT DETAIL - INCOMING TRAVEL CARD
   ========================================================= */

.task-travel-card {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid #dce3eb;
    border-radius: 13px;
    background: #f8fafc;
}

.task-travel-card__head {
    margin: 0;
    padding: 13px 15px;
    border-bottom: 1px solid #dfe5ec;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f5f7fa 100%
        );
}

.task-travel-card__kicker {
    color: #8792a2;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.task-travel-card__title {
    margin-top: 2px;
    color: #20335f;
    font-size: 0.91rem;
    font-weight: 800;
}

.task-travel-card__subtitle {
    margin-top: 2px;
    color: #7b8797;
    font-size: 0.67rem;
    line-height: 1.4;
}

.task-travel-card > .task-assignment-metrics {
    margin: 0;
    padding: 13px;
    gap: 8px;
}

.task-travel-card .task-metric {
    border-color: #e1e6ec;
    background: #ffffff;
}

.task-travel-card .task-metric span {
    color: #8792a2;
}

.task-travel-card .task-metric strong {
    color: #46546a;
}

/* Slight emphasis for travel metrics that need attention */

.task-travel-card .task-metric:has(span:first-child:nth-last-child(2)) {
    min-width: 0;
}

/* =========================================================
   TRAVEL DELAY MODAL
   ========================================================= */

.haven-travel-delay-modal {
    overflow: hidden;
    width: min(720px, calc(100vw - 28px));
    max-height: 92vh;
    overflow-y: auto;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 19px;
    background: #f5f7fa;
    box-shadow: 0 30px 75px rgba(15,23,42,0.30);
}

.haven-travel-delay-modal .travel-delay-modal-head {
    margin: 0;
    padding: 20px 21px;
    border: 0;
    background:
        linear-gradient(
            135deg,
            #594922 0%,
            #816827 100%
        );
}

.haven-travel-delay-modal .travel-delay-kicker {
    color: rgba(255,255,255,0.68);
}

.haven-travel-delay-modal .travel-delay-modal-head h2 {
    margin: 0 0 4px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
}

.haven-travel-delay-modal .travel-delay-modal-head p {
    margin: 0;
    color: rgba(255,255,255,0.77);
    font-size: 0.72rem;
    line-height: 1.45;
}

.travel-delay-summary-grid {
    margin: 14px 14px 0;
    padding: 0;
    gap: 7px;
}

.travel-delay-summary-grid .task-info-item {
    border: 1px solid #e0e5ec;
    background: #ffffff;
}

.travel-delay-summary-grid .task-info-item span {
    color: #8994a5;
}

.travel-delay-summary-grid .task-info-item strong {
    color: #4a576b;
}

.travel-delay-form {
    padding: 14px;
}

.travel-delay-form > .form-group > label {
    display: block;
    margin-bottom: 7px;
    color: #566378;
    font-size: 0.72rem;
    font-weight: 800;
}

.travel-delay-reason-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.travel-delay-reason-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 9px 10px;
    border: 1px solid #dce2ea;
    border-radius: 10px;
    background: #ffffff;
    color: #586579;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        border-color var(--haven-transition),
        background var(--haven-transition),
        box-shadow var(--haven-transition);
}

.travel-delay-reason-option:hover {
    border-color: #b6c0cd;
    background: #f9fafb;
}

.travel-delay-reason-option:has(input:checked) {
    border-color: #816827;
    background: #fffbef;
    box-shadow: 0 0 0 2px rgba(129,104,39,0.08);
}

.travel-delay-reason-option input[type="radio"] {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0;
    accent-color: #816827;
}

.travel-delay-notes {
    margin-top: 12px;
}

.travel-delay-notes textarea {
    width: 100%;
    min-height: 96px;
    box-sizing: border-box;
    resize: vertical;
}

.haven-travel-delay-modal .task-notes-modal__actions {
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid #dfe4eb;
}

.haven-travel-delay-modal .task-notes-modal__actions .primary-btn {
    min-width: 190px;
}

/* =========================================================
   SHIFT DETAIL RESPONSIVE CLEANUP
   ========================================================= */

@media (max-width: 700px) {
    .task-clock-edit-grid,
    .travel-delay-reason-grid {
        grid-template-columns: 1fr;
    }

    .task-travel-card > .task-assignment-metrics {
        grid-template-columns: 1fr;
    }

    .haven-travel-delay-modal {
        width: calc(100vw - 12px);
        max-height: 96vh;
        border-radius: 15px;
    }

    .haven-travel-delay-modal .travel-delay-modal-head {
        padding: 17px 15px;
    }

    .travel-delay-summary-grid,
    .travel-delay-form {
        margin-left: 11px;
        margin-right: 11px;
    }

    .travel-delay-form {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 12px;
    }

    .haven-travel-delay-modal .task-notes-modal__actions .primary-btn {
        width: 100%;
        min-width: 0;
    }
}

/* =========================================================
   SHIFT DETAIL - CLIENT REQUEST ALERT
   ========================================================= */

.task-client-request-card {
    border-color: #e4c96c;
    background: #fffaf0;
}

.task-client-request-card .task-alert-card__head h3 {
    color: #7a5a12;
}

.task-client-request-card .task-alert-card__head p {
    color: #917229;
}

.task-client-request-content {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(164, 125, 31, 0.18);
    border-radius: 10px;
    background: rgba(255,255,255,0.68);
    color: #5d4a1d;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.55;
}
