*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-width: 0;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    width: 100%;
    min-width: 0;
    margin: 0;
    overflow-x: hidden;
    font-size: 15px;
    line-height: 1.5;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

.app-shell,
.main-content,
.main-content-inner {
    min-width: 0;
}

.main-content {
    width: 100%;
}

.main-content-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

.health-hero,
.page-header,
.portal-page-header,
.premium-page-header,
.customer-detail-hero,
.task-detail-hero,
.task-form-hero,
.task-calendar-hero,
.dashboard-hero-clean,
.availability-page-header,
.service-questions-hero,
.service-question-form-hero,
.timeoff-hero {
    width: 100%;
    min-width: 0;
    margin-bottom: 20px;
    border-radius: 20px;
}

.health-hero-copy,
.health-hero-panel,
.health-hero-panel-actions {
    min-width: 0;
}

.health-hero h1,
.health-hero-copy h1,
.page-header h1,
.portal-page-header h1,
.premium-page-header h1,
.customer-detail-hero h1,
.task-detail-hero h1,
.task-form-hero h1,
.task-calendar-hero h1,
.dashboard-hero-clean h1,
.availability-page-header h1,
.service-questions-hero h1,
.service-question-form-hero h1,
.timeoff-hero h1 {
    font-size: clamp(24px, 2.2vw, 34px);
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.health-hero p,
.page-header p,
.portal-page-header p,
.premium-page-header p,
.customer-detail-hero p,
.task-detail-hero p,
.task-form-hero p,
.task-calendar-hero p,
.dashboard-hero-clean p,
.availability-page-header p,
.service-questions-hero p,
.service-question-form-hero p,
.timeoff-hero p {
    font-size: 15px;
    line-height: 1.55;
}

.health-card,
.content-card,
.premium-card,
.portal-card,
.customer-section-card,
.dashboard-panel,
.timeoff-card,
.sq-section-card,
.haven-pass3-card {
    min-width: 0;
    border-radius: 18px;
}

.health-card-head,
.section-header,
.haven-pass3-card-header {
    gap: 12px;
}

.health-card-head h2,
.health-card-head h3,
.section-title,
.haven-pass3-card-header h2,
.haven-pass3-card-header h3 {
    font-size: 20px;
    line-height: 1.2;
}

.info-grid,
.task-info-grid,
.form-row-grid,
.premium-form-row-grid,
.haven-pass3-form-grid,
.haven-pass3-detail-grid {
    min-width: 0;
}

.info-item,
.task-info-item,
.form-field,
.form-group,
.haven-pass3-detail-item {
    min-width: 0;
}

input,
select,
textarea,
button {
    font: inherit;
}

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="tel"],
input[type="search"],
select,
textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 16px;
    line-height: 1.35;
    border-radius: 12px;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.primary-btn,
.secondary-btn,
.danger-btn,
button.primary-btn,
button.secondary-btn,
button.danger-btn {
    min-height: 42px;
    max-width: 100%;
    padding: 10px 16px;
    border-radius: 11px;
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
}

.health-table-wrap,
.table-wrap,
.responsive-table,
.premium-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.health-table,
table {
    max-width: none;
}

.modal-backdrop {
    padding: 16px;
}

.modal-card,
.task-notes-modal {
    width: min(720px, 100%);
    max-width: 100%;
    min-width: 0;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    border-radius: 18px;
}

.health-grid,
.dashboard-grid,
.customer-detail-grid,
.task-detail-grid,
.task-form-grid {
    min-width: 0;
}

.sidebar {
    flex-shrink: 0;
}

.mobile-topbar {
    width: 100%;
}

.mobile-topbar-brand,
.mobile-topbar-left,
.mobile-topbar-brand-text {
    min-width: 0;
}

.mobile-topbar-brand-text strong,
.mobile-topbar-brand-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fc,
.fc-view-harness,
.fc-scroller,
.fc-scrollgrid {
    min-width: 0;
}

@media (max-width: 980px) {
    .main-content {
        width: 100%;
        min-width: 0;
    }

    .main-content-inner {
        max-width: none;
        padding: 18px;
    }

    .health-hero,
    .page-header,
    .portal-page-header,
    .premium-page-header,
    .customer-detail-hero,
    .task-detail-hero,
    .task-form-hero,
    .task-calendar-hero,
    .dashboard-hero-clean,
    .availability-page-header,
    .service-questions-hero,
    .service-question-form-hero,
    .timeoff-hero {
        grid-template-columns: 1fr;
    }

    .health-hero-panel,
    .health-hero-panel-actions {
        width: 100%;
        min-width: 0;
    }

    .health-grid,
    .dashboard-grid,
    .customer-detail-grid,
    .task-detail-grid,
    .task-form-grid,
    .haven-pass3-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 700px) {
    body {
        font-size: 14px;
    }

    .main-content-inner {
        padding: 12px;
    }

    .mobile-topbar {
        min-height: 58px;
        padding: 8px 12px;
    }

    .mobile-topbar-brand img {
        width: 38px;
        height: 38px;
        object-fit: contain;
    }

    .mobile-topbar-brand-text strong {
        font-size: 14px;
    }

    .mobile-topbar-brand-text span {
        font-size: 11px;
    }

    .health-hero,
    .page-header,
    .portal-page-header,
    .premium-page-header,
    .customer-detail-hero,
    .task-detail-hero,
    .task-form-hero,
    .task-calendar-hero,
    .dashboard-hero-clean,
    .availability-page-header,
    .service-questions-hero,
    .service-question-form-hero,
    .timeoff-hero {
        width: 100%;
        min-width: 0;
        padding: 16px;
        margin-bottom: 14px;
        border-radius: 16px;
    }

    .health-hero h1,
    .health-hero-copy h1,
    .page-header h1,
    .portal-page-header h1,
    .premium-page-header h1,
    .customer-detail-hero h1,
    .task-detail-hero h1,
    .task-form-hero h1,
    .task-calendar-hero h1,
    .dashboard-hero-clean h1,
    .availability-page-header h1,
    .service-questions-hero h1,
    .service-question-form-hero h1,
    .timeoff-hero h1 {
        margin-bottom: 6px;
        font-size: 23px;
        line-height: 1.15;
    }

    .health-hero p,
    .page-header p,
    .portal-page-header p,
    .premium-page-header p,
    .customer-detail-hero p,
    .task-detail-hero p,
    .task-form-hero p,
    .task-calendar-hero p,
    .dashboard-hero-clean p,
    .availability-page-header p,
    .service-questions-hero p,
    .service-question-form-hero p,
    .timeoff-hero p {
        margin-bottom: 0;
        font-size: 13px;
        line-height: 1.45;
    }

    .health-card,
    .content-card,
    .premium-card,
    .portal-card,
    .customer-section-card,
    .dashboard-panel,
    .timeoff-card,
    .sq-section-card,
    .haven-pass3-card {
        padding: 14px;
        border-radius: 15px;
    }

    .health-card + .health-card,
    .health-card-spaced {
        margin-top: 14px;
    }

    .health-card-head,
    .section-header,
    .haven-pass3-card-header {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 14px;
    }

    .health-card-head h2,
    .health-card-head h3,
    .section-title,
    .haven-pass3-card-header h2,
    .haven-pass3-card-header h3 {
        font-size: 18px;
    }

    .health-card-head p,
    .haven-pass3-card-header p {
        font-size: 13px;
    }

    .info-grid,
    .task-info-grid,
    .form-row-grid,
    .premium-form-row-grid,
    .haven-pass3-form-grid,
    .haven-pass3-detail-grid,
    .service-note-filter-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .info-item,
    .task-info-item,
    .haven-pass3-detail-item {
        padding: 12px;
        border-radius: 12px;
    }

    .info-item span,
    .task-info-item span,
    .haven-pass3-detail-item span {
        font-size: 10px;
    }

    .info-item strong,
    .task-info-item strong,
    .haven-pass3-detail-item strong {
        font-size: 14px;
    }

    .form-group,
    .form-field {
        margin-bottom: 12px;
    }

    .form-group label,
    .form-field label {
        font-size: 13px;
    }

    .form-input,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    input[type="tel"],
    input[type="search"],
    select,
    textarea {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 16px;
        border-radius: 10px;
    }

    textarea {
        min-height: 100px;
    }

    .form-actions,
    .task-form-actions,
    .task-assignment-actions,
    .task-notes-modal__actions,
    .health-hero-panel-actions {
        width: 100%;
        gap: 8px;
    }

    .form-actions .primary-btn,
    .form-actions .secondary-btn,
    .task-form-actions .primary-btn,
    .task-form-actions .secondary-btn,
    .task-notes-modal__actions .primary-btn,
    .task-notes-modal__actions .secondary-btn {
        width: 100%;
    }

    .primary-btn,
    .secondary-btn,
    .danger-btn,
    button.primary-btn,
    button.secondary-btn,
    button.danger-btn {
        min-height: 42px;
        padding: 9px 13px;
        font-size: 13px;
    }

    .modal-backdrop {
        padding: 8px;
        align-items: flex-start;
    }

    .modal-card,
    .task-notes-modal {
        width: 100%;
        max-width: none;
        max-height: calc(100dvh - 16px);
        margin: 0;
        border-radius: 14px;
    }

    .task-notes-modal__head {
        gap: 10px;
    }

    .task-notes-modal__head h2 {
        font-size: 21px;
    }

    .health-table-wrap {
        margin-left: 0;
        margin-right: 0;
        border-radius: 12px;
    }

    .health-table {
        font-size: 13px;
    }

    .health-table th,
    .health-table td {
        padding: 10px 9px;
    }

    .health-pill,
    .pill,
    .task-event-status {
        font-size: 10px;
    }

    .haven-pass3-week-nav {
        border-radius: 14px;
        padding: 10px;
    }

    .haven-pass3-week-nav span {
        font-size: 12px;
        text-align: center;
    }

    .haven-pass3-option-row {
        grid-template-columns: 1fr;
    }

    .service-note-summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .service-note-summary {
        padding: 12px;
        border-radius: 13px;
    }

    .service-note-summary strong {
        font-size: 24px;
    }

    .service-note-summary span {
        font-size: 11px;
    }
}

@media (max-width: 420px) {
    .main-content-inner {
        padding: 10px;
    }

    .health-hero,
    .page-header,
    .portal-page-header,
    .premium-page-header,
    .customer-detail-hero,
    .task-detail-hero,
    .task-form-hero,
    .task-calendar-hero,
    .dashboard-hero-clean,
    .availability-page-header,
    .service-questions-hero,
    .service-question-form-hero,
    .timeoff-hero {
        padding: 14px;
    }

    .service-note-summary-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   HAVEN DARK NAVY + COMPACT MOBILE PASS
   ========================================================= */

:root {
    --haven-dark-navy: #20335f;
    --haven-dark-navy-hover: #172747;
    --haven-dark-navy-soft: #eef1f7;
}

/* Restore darker Haven primary colour */
.primary-btn,
button.primary-btn,
input[type="submit"].primary-btn,
.planner-primary-btn {
    background: var(--haven-dark-navy) !important;
    border-color: var(--haven-dark-navy) !important;
    color: #ffffff !important;
}

.primary-btn:hover,
button.primary-btn:hover,
input[type="submit"].primary-btn:hover,
.planner-primary-btn:hover {
    background: var(--haven-dark-navy-hover) !important;
    border-color: var(--haven-dark-navy-hover) !important;
}

/* Restore dark Haven banners */
.health-hero,
.page-header,
.portal-page-header,
.premium-page-header,
.customer-detail-hero,
.task-detail-hero,
.task-form-hero,
.task-calendar-hero,
.dashboard-hero-clean,
.availability-page-header,
.service-questions-hero,
.service-question-form-hero,
.timeoff-hero {
    background-color: var(--haven-dark-navy) !important;
    color: #ffffff !important;
}

.health-hero h1,
.health-hero h2,
.health-hero h3,
.health-hero p,
.health-hero-copy h1,
.health-hero-copy p,
.page-header h1,
.page-header p,
.portal-page-header h1,
.portal-page-header p,
.premium-page-header h1,
.premium-page-header p,
.customer-detail-hero h1,
.customer-detail-hero p,
.task-detail-hero h1,
.task-detail-hero p,
.task-form-hero h1,
.task-form-hero p,
.task-calendar-hero h1,
.task-calendar-hero p,
.dashboard-hero-clean h1,
.dashboard-hero-clean p,
.availability-page-header h1,
.availability-page-header p,
.service-questions-hero h1,
.service-questions-hero p,
.service-question-form-hero h1,
.service-question-form-hero p,
.timeoff-hero h1,
.timeoff-hero p {
    color: #ffffff !important;
}

/* Secondary buttons inside dark banners */
.health-hero .secondary-btn,
.page-header .secondary-btn,
.portal-page-header .secondary-btn,
.premium-page-header .secondary-btn,
.customer-detail-hero .secondary-btn,
.task-detail-hero .secondary-btn,
.task-form-hero .secondary-btn,
.task-calendar-hero .secondary-btn,
.dashboard-hero-clean .secondary-btn,
.availability-page-header .secondary-btn,
.service-questions-hero .secondary-btn,
.service-question-form-hero .secondary-btn,
.timeoff-hero .secondary-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
}

/* Headings throughout portal */
.health-card-head h2,
.health-card-head h3,
.section-title,
.haven-pass3-card-header h2,
.haven-pass3-card-header h3 {
    color: var(--haven-dark-navy) !important;
}


/* =========================================================
   COMPACT MOBILE GRIDS
   ========================================================= */

@media (max-width: 700px) {

    .main-content-inner {
        padding: 8px 10px !important;
    }

    .health-hero,
    .page-header,
    .portal-page-header,
    .premium-page-header,
    .customer-detail-hero,
    .task-detail-hero,
    .task-form-hero,
    .task-calendar-hero,
    .dashboard-hero-clean,
    .availability-page-header,
    .service-questions-hero,
    .service-question-form-hero,
    .timeoff-hero {
        padding: 12px 14px !important;
        margin-bottom: 10px !important;
        border-radius: 13px !important;
    }

    .health-hero h1,
    .health-hero-copy h1,
    .page-header h1,
    .portal-page-header h1,
    .premium-page-header h1,
    .customer-detail-hero h1,
    .task-detail-hero h1,
    .task-form-hero h1,
    .task-calendar-hero h1,
    .dashboard-hero-clean h1,
    .availability-page-header h1,
    .service-questions-hero h1,
    .service-question-form-hero h1,
    .timeoff-hero h1 {
        font-size: 20px !important;
        line-height: 1.15 !important;
    }

    .health-hero p,
    .page-header p,
    .portal-page-header p,
    .premium-page-header p,
    .customer-detail-hero p,
    .task-detail-hero p,
    .task-form-hero p,
    .task-calendar-hero p,
    .dashboard-hero-clean p,
    .availability-page-header p,
    .service-questions-hero p,
    .service-question-form-hero p,
    .timeoff-hero p {
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    .health-card,
    .content-card,
    .premium-card,
    .portal-card,
    .customer-section-card,
    .dashboard-panel,
    .timeoff-card,
    .sq-section-card,
    .haven-pass3-card {
        padding: 10px !important;
        border-radius: 12px !important;
    }

    /* Keep information grids compact instead of one giant item per row */
    .info-grid,
    .task-info-grid,
    .haven-pass3-detail-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    .info-item,
    .task-info-item,
    .haven-pass3-detail-item {
        min-width: 0 !important;
        padding: 8px 9px !important;
        border-radius: 10px !important;
    }

    .info-item span,
    .task-info-item span,
    .haven-pass3-detail-item span {
        margin-bottom: 2px !important;
        font-size: 9px !important;
        line-height: 1.2 !important;
    }

    .info-item strong,
    .task-info-item strong,
    .haven-pass3-detail-item strong {
        font-size: 12px !important;
        line-height: 1.3 !important;
        overflow-wrap: anywhere;
    }

    .task-info-item--full,
    .haven-pass3-detail-item.full,
    .full-width {
        grid-column: 1 / -1 !important;
    }

    .health-card-head,
    .section-header,
    .haven-pass3-card-header {
        margin-bottom: 9px !important;
        gap: 6px !important;
    }

    .health-card-head h2,
    .health-card-head h3,
    .section-title,
    .haven-pass3-card-header h2,
    .haven-pass3-card-header h3 {
        font-size: 16px !important;
    }

    .health-card-head p,
    .haven-pass3-card-header p {
        font-size: 11px !important;
        line-height: 1.35 !important;
    }

    /* Compact metric grids such as travel calculations */
    .task-metric {
        padding: 7px 8px !important;
        min-width: 0 !important;
    }

    .task-metric span {
        font-size: 9px !important;
        line-height: 1.15 !important;
    }

    .task-metric strong {
        font-size: 12px !important;
        line-height: 1.25 !important;
    }

    /* Tables */
    .health-table {
        font-size: 11px !important;
    }

    .health-table th,
    .health-table td {
        padding: 7px 7px !important;
        line-height: 1.25 !important;
    }

    .health-pill,
    .pill {
        padding: 4px 7px !important;
        font-size: 9px !important;
    }

    /* Calendar / roster */
    .fc {
        font-size: 11px !important;
    }

    .fc .fc-toolbar-title {
        font-size: 16px !important;
    }

    .fc .fc-button {
        padding: 5px 7px !important;
        font-size: 10px !important;
    }

    .fc .fc-col-header-cell-cushion {
        padding: 5px 3px !important;
        font-size: 10px !important;
    }

    .fc .fc-daygrid-day-number {
        padding: 4px !important;
        font-size: 10px !important;
    }

    .fc-event {
        font-size: 10px !important;
        line-height: 1.15 !important;
    }

    .task-event-meta {
        font-size: 9px !important;
        line-height: 1.15 !important;
    }

    .task-event-status {
        padding: 2px 5px !important;
        font-size: 8px !important;
    }

    /* Service-note dashboard summary */
    .service-note-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    .service-note-summary {
        padding: 9px !important;
        border-radius: 10px !important;
    }

    .service-note-summary span {
        font-size: 9px !important;
    }

    .service-note-summary strong {
        font-size: 20px !important;
    }
}


/* Very narrow phones only */
@media (max-width: 360px) {

    .info-grid,
    .task-info-grid,
    .haven-pass3-detail-grid {
        grid-template-columns: 1fr !important;
    }

    .service-note-summary-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}


/* =========================================================
   FORCE ORIGINAL DARK HAVEN NAVY
   ========================================================= */

:root {
    --navy: #20335f !important;
    --primary: #20335f !important;
    --primary-dark: #172747 !important;
    --haven-dark-navy: #20335f !important;
}

/* Main Haven banners */
.health-hero,
.page-header,
.portal-page-header,
.premium-page-header,
.customer-detail-hero,
.task-detail-hero,
.task-form-hero,
.task-calendar-hero,
.dashboard-hero-clean,
.availability-page-header,
.service-questions-hero,
.service-question-form-hero,
.timeoff-hero {
    background: #20335f !important;
    background-color: #20335f !important;
    background-image: none !important;
    border-color: rgba(32, 51, 95, 0.25) !important;
}

/* Remove old light-blue decorative layers */
.health-hero::before,
.health-hero::after,
.page-header::before,
.page-header::after,
.portal-page-header::before,
.portal-page-header::after,
.premium-page-header::before,
.premium-page-header::after,
.customer-detail-hero::before,
.customer-detail-hero::after,
.task-detail-hero::before,
.task-detail-hero::after,
.task-form-hero::before,
.task-form-hero::after,
.task-calendar-hero::before,
.task-calendar-hero::after,
.dashboard-hero-clean::before,
.dashboard-hero-clean::after,
.availability-page-header::before,
.availability-page-header::after,
.service-questions-hero::before,
.service-questions-hero::after,
.service-question-form-hero::before,
.service-question-form-hero::after,
.timeoff-hero::before,
.timeoff-hero::after {
    background: transparent !important;
    background-image: none !important;
}

/* Force banner text white */
.health-hero *,
.page-header *,
.portal-page-header *,
.premium-page-header *,
.customer-detail-hero *,
.task-detail-hero *,
.task-form-hero *,
.task-calendar-hero *,
.dashboard-hero-clean *,
.availability-page-header *,
.service-questions-hero *,
.service-question-form-hero *,
.timeoff-hero * {
    --navy: #ffffff;
}

/* Keep headings and body text readable */
.health-hero h1,
.health-hero h2,
.health-hero h3,
.health-hero p,
.health-hero span,
.page-header h1,
.page-header h2,
.page-header h3,
.page-header p,
.portal-page-header h1,
.portal-page-header p,
.premium-page-header h1,
.premium-page-header p,
.customer-detail-hero h1,
.customer-detail-hero p,
.task-detail-hero h1,
.task-detail-hero p,
.task-form-hero h1,
.task-form-hero p,
.task-calendar-hero h1,
.task-calendar-hero p,
.dashboard-hero-clean h1,
.dashboard-hero-clean p,
.availability-page-header h1,
.availability-page-header p,
.service-questions-hero h1,
.service-questions-hero p,
.service-question-form-hero h1,
.service-question-form-hero p,
.timeoff-hero h1,
.timeoff-hero p {
    color: #ffffff !important;
}

/* Primary Haven buttons */
.primary-btn,
button.primary-btn,
input.primary-btn,
input[type="submit"].primary-btn,
.planner-primary-btn {
    background: #20335f !important;
    background-image: none !important;
    border-color: #20335f !important;
    color: #ffffff !important;
}

.primary-btn:hover,
button.primary-btn:hover,
input.primary-btn:hover,
input[type="submit"].primary-btn:hover,
.planner-primary-btn:hover {
    background: #172747 !important;
    background-image: none !important;
    border-color: #172747 !important;
}

/* Dark Haven sidebar */
.sidebar {
    background: #20335f !important;
    background-image: none !important;
}

/* Mobile header */
.mobile-topbar {
    background: #20335f !important;
    background-image: none !important;
}

.mobile-topbar-brand-text strong,
.mobile-topbar-brand-text span {
    color: #ffffff !important;
}




/* =========================================================
   HAVEN MOBILE GRID DENSITY FINAL
   ========================================================= */

@media (max-width: 700px) {

    /* Normal information/detail grids */
    .info-grid,
    .task-info-grid,
    .haven-pass3-detail-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 5px !important;
    }

    .info-item,
    .task-info-item,
    .haven-pass3-detail-item {
        min-width: 0 !important;
        min-height: 0 !important;
        padding: 7px 8px !important;
        border-radius: 9px !important;
    }

    .info-item span,
    .task-info-item span,
    .haven-pass3-detail-item span {
        margin-bottom: 2px !important;
        font-size: 9px !important;
        line-height: 1.15 !important;
        letter-spacing: 0.03em !important;
    }

    .info-item strong,
    .task-info-item strong,
    .haven-pass3-detail-item strong {
        font-size: 11px !important;
        line-height: 1.25 !important;
        overflow-wrap: anywhere !important;
    }

    .task-info-item--full,
    .haven-pass3-detail-item.full {
        grid-column: 1 / -1 !important;
    }

    /* Travel / task metrics */
    .task-metric {
        min-width: 0 !important;
        min-height: 0 !important;
        padding: 6px 7px !important;
        border-radius: 8px !important;
    }

    .task-metric span {
        margin-bottom: 1px !important;
        font-size: 9px !important;
        line-height: 1.15 !important;
    }

    .task-metric strong {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    /* Cards */
    .health-card,
    .content-card,
    .premium-card,
    .portal-card,
    .customer-section-card,
    .dashboard-panel,
    .timeoff-card,
    .sq-section-card,
    .haven-pass3-card {
        padding: 9px !important;
    }

    .health-card-head,
    .section-header,
    .haven-pass3-card-header {
        margin-bottom: 8px !important;
        gap: 5px !important;
    }

    .health-card-head h2,
    .health-card-head h3,
    .section-title,
    .haven-pass3-card-header h2,
    .haven-pass3-card-header h3 {
        font-size: 15px !important;
    }

    /* Tables */
    .health-table {
        font-size: 10px !important;
    }

    .health-table th,
    .health-table td {
        padding: 5px 6px !important;
        line-height: 1.25 !important;
    }

    .health-pill,
    .pill {
        padding: 3px 6px !important;
        font-size: 9px !important;
    }

    /* Employee roster calendar */
    .fc {
        font-size: 10px !important;
    }

    .fc .fc-toolbar {
        gap: 5px !important;
    }

    .fc .fc-toolbar-title {
        font-size: 15px !important;
    }

    .fc .fc-button {
        padding: 4px 6px !important;
        font-size: 9px !important;
        min-height: 30px !important;
    }

    .fc .fc-col-header-cell-cushion {
        padding: 4px 2px !important;
        font-size: 9px !important;
    }

    .fc .fc-daygrid-day-number {
        padding: 3px !important;
        font-size: 9px !important;
    }

    .fc .fc-daygrid-day-frame {
        min-height: 52px !important;
    }

    .fc-event {
        font-size: 9px !important;
        line-height: 1.1 !important;
    }

    .fc-event-main {
        padding: 2px !important;
    }

    .task-event-meta {
        margin-top: 1px !important;
        font-size: 8px !important;
        line-height: 1.1 !important;
    }

    .task-event-status {
        margin-top: 2px !important;
        padding: 2px 4px !important;
        font-size: 8px !important;
        line-height: 1.1 !important;
    }

    /* Service-note management figures */
    .service-note-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 5px !important;
    }

    .service-note-summary {
        padding: 8px !important;
        border-radius: 10px !important;
    }

    .service-note-summary span {
        font-size: 9px !important;
    }

    .service-note-summary strong {
        font-size: 19px !important;
    }
}

/* CLICKABLE CLIENT LIST ROWS */
.client-table-row-link {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.client-table-row-link:hover {
    background: rgba(32, 51, 95, 0.055) !important;
}

.client-table-row-link:focus {
    outline: 2px solid #20335f;
    outline-offset: -2px;
}

/* HAVEN PROFILE TIMELINE */

.profile-timeline-section {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid rgba(32, 51, 95, 0.12);
    border-radius: 20px;
    background: #ffffff;
}

.profile-timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.profile-timeline-head h3 {
    margin: 0;
}

.profile-timeline-head p {
    margin: 5px 0 0;
    color: #64748b;
}

.profile-timeline-add {
    flex: 0 0 auto;
}

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

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

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

.profile-timeline-head:has(.profile-timeline-add[open]) {
    flex-wrap: wrap;
}

.profile-timeline-form {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid rgba(32, 51, 95, 0.12);
    border-radius: 16px;
    background: #f8fafc;
}

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

.profile-timeline-form-grid label {
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
    color: #1f2937;
}

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

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

.profile-timeline-list {
    display: grid;
    gap: 12px;
}

.profile-timeline-entry {
    position: relative;
    padding: 16px 18px 16px 20px;
    border: 1px solid rgba(32, 51, 95, 0.10);
    border-left: 4px solid #20335f;
    border-radius: 14px;
    background: #ffffff;
}

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

.profile-timeline-entry-top time {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.profile-timeline-entry h4 {
    margin: 12px 0 6px;
    color: #111827;
    font-size: 16px;
}

.profile-timeline-notes {
    color: #334155;
    line-height: 1.55;
}

.profile-timeline-follow-up {
    display: inline-block;
    margin-top: 12px;
    padding: 7px 10px;
    border-radius: 10px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
}

.profile-timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 13px;
    color: #64748b;
    font-size: 11px;
}

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

@media (max-width: 700px) {
    .profile-timeline-section {
        padding: 12px;
    }

    .profile-timeline-head {
        flex-direction: column;
    }

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

    .profile-timeline-add > summary {
        width: 100%;
        text-align: center;
    }

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

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

    .profile-timeline-entry {
        padding: 12px;
    }

    .profile-timeline-entry-top {
        align-items: flex-start;
    }
}


/* TIMELINE ATTACHMENTS */

.profile-timeline-section--staff {
    width: 100%;
    box-sizing: border-box;
}

.profile-timeline-file-help {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
}

.profile-timeline-attachments {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(32, 51, 95, 0.10);
}

.profile-timeline-attachments > strong {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 12px;
}

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

.profile-timeline-attachment {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid rgba(32, 51, 95, 0.15);
    border-radius: 9px;
    background: #f8fafc;
    color: #20335f;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.profile-timeline-attachment:hover {
    background: #eef2f7;
}

@media (max-width: 700px) {
    .profile-timeline-attachment-list {
        display: grid;
        grid-template-columns: 1fr;
    }

    .profile-timeline-attachment {
        width: 100%;
        box-sizing: border-box;
    }
}

/* DASHBOARD FOLLOW-UP ACTION CENTRE */

.dashboard-action-centre {
    grid-column: 1 / -1;
    margin-top: 20px;
    padding: 20px;
    border: 1px solid rgba(32, 51, 95, 0.12);
    border-radius: 22px;
    background: #ffffff;
}

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

.dashboard-action-stat {
    padding: 14px;
    border: 1px solid rgba(32, 51, 95, 0.10);
    border-radius: 14px;
    background: #f8fafc;
}

.dashboard-action-stat span,
.dashboard-action-stat small {
    display: block;
    color: #64748b;
}

.dashboard-action-stat strong {
    display: block;
    margin: 5px 0;
    color: #20335f;
    font-size: 26px;
}

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

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

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

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

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

.dashboard-action-column__head h4 {
    margin: 0;
    color: #20335f;
}

.dashboard-action-column__head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

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

.dashboard-action-item,
.dashboard-service-note-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(32, 51, 95, 0.10);
    border-radius: 13px;
    background: #ffffff;
    text-decoration: none;
}

.dashboard-action-item__main {
    min-width: 0;
    flex: 1;
}

.dashboard-action-item__main > a,
.dashboard-service-note-action {
    color: inherit;
    text-decoration: none;
}

.dashboard-action-item__main > a {
    display: block;
}

.dashboard-action-item strong,
.dashboard-service-note-action strong {
    display: block;
    color: #172747;
    margin: 4px 0;
}

.dashboard-action-item span,
.dashboard-service-note-action span {
    color: #475569;
}

.dashboard-action-item small,
.dashboard-service-note-action small {
    display: block;
    margin-top: 4px;
    color: #64748b;
}

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

.dashboard-action-type {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.dashboard-action-status {
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.dashboard-action-status--overdue {
    background: #fee2e2;
    color: #991b1b !important;
}

.dashboard-action-status--today {
    background: #ffedd5;
    color: #9a3412 !important;
}

.dashboard-action-status--upcoming {
    background: #eef2ff;
    color: #3730a3 !important;
}

.dashboard-action-complete {
    flex: 0 0 auto;
}

.dashboard-action-complete button {
    border: 1px solid rgba(32, 51, 95, 0.20);
    border-radius: 9px;
    padding: 8px 10px;
    background: #ffffff;
    color: #20335f;
    font-weight: 800;
    cursor: pointer;
}

.dashboard-action-complete button:hover {
    background: #f1f5f9;
}

.dashboard-service-note-action:hover,
.dashboard-action-item:hover {
    background: #f8fafc;
}

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

@media (max-width: 850px) {
    .dashboard-action-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 520px) {
    .dashboard-action-centre {
        padding: 12px;
    }

    .dashboard-action-summary {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .dashboard-action-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-action-complete {
        width: 100%;
    }

    .dashboard-action-complete button {
        width: 100%;
    }
}

/* TASK DELETE */

.task-delete-form {
    margin: 0;
}

.danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid #dc2626;
    border-radius: 10px;
    background: #ffffff;
    color: #b91c1c;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.danger-btn:hover {
    background: #fef2f2;
}

@media (max-width: 700px) {
    .task-detail-hero__actions .task-delete-form,
    .task-detail-hero__actions .danger-btn {
        width: 100%;
    }
}

/* ROSTER DELETE OPTIONS */

.danger-btn--strong {
    background: #b91c1c;
    color: #ffffff;
}

.danger-btn--strong:hover {
    background: #991b1b;
    color: #ffffff;
}

#planner-delete-one-btn,
#planner-delete-future-btn {
    flex: 0 0 auto;
}

@media (max-width: 700px) {
    #planner-delete-one-btn,
    #planner-delete-future-btn {
        width: 100%;
    }
}

/* BETTER DELETE BUTTON STYLING */

.danger-btn,
button.danger-btn,
input.danger-btn,
#planner-delete-one-btn,
#planner-delete-future-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 10px 16px !important;
    border: 1px solid #dc2626 !important;
    border-radius: 10px !important;
    background: #dc2626 !important;
    background-image: none !important;
    color: #ffffff !important;
    font: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease !important;
}

.danger-btn:hover,
button.danger-btn:hover,
input.danger-btn:hover,
#planner-delete-one-btn:hover,
#planner-delete-future-btn:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
}

.danger-btn:active,
button.danger-btn:active,
input.danger-btn:active,
#planner-delete-one-btn:active,
#planner-delete-future-btn:active {
    transform: translateY(1px) !important;
}

.danger-btn:focus,
button.danger-btn:focus,
input.danger-btn:focus,
#planner-delete-one-btn:focus,
#planner-delete-future-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18) !important;
}

.danger-btn--strong,
button.danger-btn--strong,
#planner-delete-future-btn {
    background: #991b1b !important;
    border-color: #991b1b !important;
    color: #ffffff !important;
}

.danger-btn--strong:hover,
button.danger-btn--strong:hover,
#planner-delete-future-btn:hover {
    background: #7f1d1d !important;
    border-color: #7f1d1d !important;
    color: #ffffff !important;
}

/* planner modal footer spacing */
.planner-modal__footer,
.planner-modal__actions,
.planner-form-actions {
    gap: 10px;
    flex-wrap: wrap;
}

#planner-delete-one-btn,
#planner-delete-future-btn {
    margin-right: 0 !important;
}

@media (max-width: 700px) {
    .danger-btn,
    button.danger-btn,
    #planner-delete-one-btn,
    #planner-delete-future-btn {
        width: 100% !important;
    }
}

/* =========================================================
   HAVEN GLOBAL FLUID TABLES
   ========================================================= */

/*
Desktop table pages may use all available main-content width.
*/
@media (min-width: 1101px) {

    .main-content-inner:has(
        .portal-table,
        .health-table,
        .sq-table,
        .timeoff-table,
        .premium-table,
        .table-wrap,
        .table-responsive
    ) {
        max-width: none !important;
        width: 100% !important;
    }

    .main-content-inner:has(table) .client-list-shell,
    .main-content-inner:has(table) .customer-detail-shell,
    .main-content-inner:has(table) .dashboard-shell,
    .main-content-inner:has(table) .portal-page,
    .main-content-inner:has(table) .page-shell,
    .main-content-inner:has(table) .content-shell,
    .main-content-inner:has(table) .list-page,
    .main-content-inner:has(table) .detail-page,
    .main-content-inner:has(table) .vault-page,
    .main-content-inner:has(table) .timeoff-page,
    .main-content-inner:has(table) .service-question-page,
    .main-content-inner:has(table) .onboarding-v2 {
        max-width: none !important;
        width: 100% !important;
    }

    .table-wrap,
    .table-responsive,
    .portal-table-wrap,
    .health-table-wrap,
    .sq-table-wrap,
    .timeoff-table-wrap,
    .premium-table-wrap {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .portal-table,
    .health-table,
    .sq-table,
    .timeoff-table,
    .premium-table,
    .table-wrap table,
    .table-responsive table {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: fixed !important;
    }

    .portal-table th,
    .portal-table td,
    .health-table th,
    .health-table td,
    .sq-table th,
    .sq-table td,
    .timeoff-table th,
    .timeoff-table td,
    .premium-table th,
    .premium-table td,
    .table-wrap th,
    .table-wrap td,
    .table-responsive th,
    .table-responsive td {
        min-width: 0 !important;
        max-width: none !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    /*
    Make the employee Rostered vs Actual floating window
    use the available desktop width.
    */
    .roster-clock-modal__card {
        width: calc(100vw - 64px) !important;
        max-width: none !important;
    }
}


/*
Keep wide tables usable on smaller screens.
*/
@media (max-width: 1100px) {

    .table-wrap,
    .table-responsive,
    .portal-table-wrap,
    .health-table-wrap,
    .sq-table-wrap,
    .timeoff-table-wrap,
    .premium-table-wrap {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .portal-table,
    .health-table,
    .sq-table,
    .timeoff-table,
    .premium-table {
        table-layout: auto !important;
    }
}


/* Employee roster modal responsive safeguard */
@media (max-width: 900px) {
    .roster-clock-modal__body .premium-table-wrap {
        overflow-x: auto !important;
    }

    .roster-clock-modal__body .premium-table {
        min-width: 1050px !important;
        table-layout: auto !important;
    }
}


/* =========================================================
   SIDEBAR BRAND - KEEP YELLOW ONLY ON THE LOGO
   ========================================================= */

/* Outer brand card stays dark / neutral */
.sidebar-brand,
.sidebar-brand-card,
.sidebar-header-card,
.portal-brand-card,
.haven-brand-card,
.sidebar .brand-card,
.sidebar .portal-brand {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

/* Remove any yellow decorative overlays from the whole card */
.sidebar-brand::before,
.sidebar-brand::after,
.sidebar-brand-card::before,
.sidebar-brand-card::after,
.sidebar-header-card::before,
.sidebar-header-card::after,
.portal-brand-card::before,
.portal-brand-card::after,
.haven-brand-card::before,
.haven-brand-card::after {
    background: transparent !important;
    background-image: none !important;
}

/* Only the logo tile is yellow */
.sidebar-brand-logo,
.sidebar-logo,
.sidebar-logo-wrap,
.sidebar-brand-badge,
.portal-brand-logo,
.haven-brand-logo,
.sidebar .brand-logo,
.sidebar .portal-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 68px !important;
    height: 68px !important;
    min-width: 68px !important;
    min-height: 68px !important;
    border-radius: 16px !important;
    background: #d7c64b !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
    overflow: hidden !important;
}

/* Keep the actual logo neatly inside the yellow tile */
.sidebar-brand-logo img,
.sidebar-logo img,
.sidebar-logo-wrap img,
.sidebar-brand-badge img,
.portal-brand-logo img,
.haven-brand-logo img,
.sidebar .brand-logo img,
.sidebar .portal-logo img {
    max-width: 82% !important;
    max-height: 82% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* Brand text stays clean and white */
.sidebar-brand strong,
.sidebar-brand-card strong,
.sidebar-header-card strong,
.portal-brand-card strong,
.haven-brand-card strong,
.sidebar .brand-card strong,
.sidebar .portal-brand strong {
    color: #ffffff !important;
}

.sidebar-brand span,
.sidebar-brand-card span,
.sidebar-header-card span,
.portal-brand-card span,
.haven-brand-card span,
.sidebar .brand-card span,
.sidebar .portal-brand span {
    color: rgba(255, 255, 255, 0.78) !important;
}
