/* Reference design adapted to the original application. No reference/demo logic. */
:root {
    --navy: #112e4c;
    --blue: #286fbd;
    --darkblue: #1e5b9f;
--bg: #f5f5f5;
    --paper: #fff;
    --line: #e2e9f1;
    --ink: #17324f;
    --muted: #71849c;
    --soft: #edf4fe;
    --good: #278264;
    --warn: #a57523;
    --bad: #bd4c59;
    --shadow: none
}

body {
    background: var(--bg);
    font-family: system-ui, 'Segoe UI', Arial, sans-serif;
    color: var(--ink);
    line-height: 1.5
}

.side {
    width: 220px;
    background: var(--navy);
    padding: 24px 15px;
    color: #b9cadd
}

.side .brand {
    padding: 10px 12px;
    margin: 0 6px 16px;
    background: #fff;
    border: 0;
    border-radius: 9px;
    min-height: 0
}

.side .brand-logo {
    display: block;
    filter: none;
    width: 100%;
    max-width: 174px;
    height: auto;
    padding: 0;
    background: transparent
}

.side .navcap {
    color: #88a4bf;
    font-size: 10px;
    letter-spacing: 1.5px;
    margin: 22px 12px 9px
}

.side .navbtn {
    border-radius: 8px;
    padding: 12px 13px;
    color: #b9cadd;
    gap: 11px;
    font-weight: 500;
    box-shadow: none
}

.side .navbtn:hover {
    background: #203f5e;
    color: #fff
}

.side .navbtn.active {
    background: #295276;
    color: #fff;
    box-shadow: none
}

.side .mv-sidebar-brand {
    background: #fff;
    border-radius: 8px;
    padding: 5px 12px;
    margin-top: 30px;
    max-width: 140px
}

.side .mv-sidebar-brand img {
    filter: none;
    width: 105px;
    height: 78px;
    object-fit: contain
}

.top {
    height: 77px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0 25px;
    gap: 13px
}

.top-location {
    display: block
}

.top-location span {
    display: block;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase
}

.top-location strong {
    display: block;
    border: 0;
    padding: 0;
    font-size: 14px;
    color: var(--ink)
}

.top .right>button {
    height: 37px;
    font-size: 12px;
    border-radius: 7px
}

.workspace-person b {
    color: var(--ink)
}

.workspace-avatar {
    background: #e9f2fd;
    color: var(--blue)
}

.wrap {
    width: 100%;
    box-sizing: border-box;
    padding: 29px 25px 40px;
    max-width: none;
    margin: 0;
}

.heading {
    margin-bottom: 23px
}

.heading h1 {
    font-size: 25px;
    line-height: 1.25;
    letter-spacing: -.6px;
    font-weight: 600;
    color: var(--ink)
}

.heading p,
.hint {
    color: var(--muted)
}

.group {
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: none;
    background: #fff;
    margin-bottom: 20px;
    overflow: hidden
}

.group-title h2,
h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink)
}

button {
    border: 1px solid #d9e3ee;
    color: var(--ink);
    border-radius: 7px;
    padding: 9px 12px;
    transition: background .15s, border-color .15s
}

button:hover {
    border-color: #90b6e1;
    background: #f5f9ff
}

button.primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff
}

button.primary:hover {
    background: var(--darkblue)
}

button:disabled {
    opacity: .5;
    cursor: not-allowed
}

input,
select,
textarea {
    border-color: #dbe4ef;
    border-radius: 7px;
    color: var(--ink);
    background: white
}

textarea {
    resize: vertical
}

label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500
}

table {
    font-size: 12px
}

.tbl th,
table th {
    background: #f8fafc;
    color: #8091a5;
    font-size: 10px;
    letter-spacing: .6px;
    text-transform: uppercase;
    font-weight: 500;
    padding: 13px
}

.tbl td,
table td {
    padding: 14px 13px;
    border-bottom: 1px solid #edf1f6;
    font-size: 12px;
    vertical-align: middle
}

.tbl tr:hover td {
    background: #f8fbff
}

.pill {
    border-radius: 5px;
    font-size: 10px;
    padding: 3px 7px;
    background: #eaf2fd;
    color: #3e78ba
}

.pill.pending {
    background: #fff4de;
    color: #a07625
}

.pill.completed {
    background: #f0f3f6;
    color: #7b8c9d
}

.pill.urgent {
    background: #fcecef;
    color: #ba4d5b
}

.tools {
    background: #fcfdff;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
    gap: 9px
}

.config-nav {
    gap: 15px
}

.config-tile {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px;
    min-height: 120px;
    text-align: left
}

.config-tile strong {
    font-size: 14px;
    font-weight: 600
}

.config-tile small {
    margin-top: 9px;
    color: var(--muted)
}

.modalcover {
    background: #102b4a83;
    backdrop-filter: blur(3px)
}

.modal {
    border-radius: 14px;
    box-shadow: 0 20px 80px #102b4a44;
    border: 0
}

.modalhead {
    padding: 22px 25px 18px;
    background: white;
    border-bottom: 1px solid var(--line)
}

.modalhead h2 {
    font-size: 21px;
    letter-spacing: -.5px;
    font-weight: 600
}

.modalbody {
    padding: 23px 25px
}

.modalfoot {
    padding: 17px 25px;
    background: white;
    border-top: 1px solid var(--line);
    gap: 10px
}

.followup-form .modal {
    width: 650px;
    max-width: calc(100vw - 32px)
}

.form-intro {
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 22px
}

.followup-form .interaction-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px
}

.followup-form .field {
    min-width: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px
}

.followup-form .field label {
    margin: 0
}

.followup-form .field input,
.followup-form .field select {
    width: 100%;
    height: 40px
}

.followup-form .followup-subject,
.followup-form .interaction-notes,
.followup-form .followup-pending,
.followup-form .pdo-options {
    grid-column: 1/-1
}

.followup-form .interaction-followup {
    grid-column: auto
}

.followup-form .interaction-notes textarea {
    min-height: 96px;
    max-height: none;
    width: 100%;
    padding: 11px;
    line-height: 1.6
}

.followup-form .pdo-options {
    border-top: 1px solid var(--line);
    padding-top: 19px;
    margin-top: 4px
}

.followup-form .pdo-options-buttons {
    gap: 10px;
    flex-wrap: wrap
}

.followup-form .contact-row {
    background: #f7fafe;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.followup-form .contact-row input {
    width: 100%;
    min-width: 0
}

.followup-form .contact-row button {
    justify-self: end
}

.selected-files {
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
    margin-top: 8px
}

.form-notice,
.duplicate-notice {
    font-size: 12px;
    border-radius: 8px;
    padding: 13px 15px;
    line-height: 1.6;
    background: #f0f6fe;
    border: 1px solid #d7e6f8;
    color: #547b9f
}

.form-notice {
    margin: 5px 0 0
}

.duplicate-notice {
    background: #fff8eb;
    border-color: #f0dfb7;
    color: #876327;
    margin-top: 20px
}

.duplicate-notice button {
    display: block;
    margin-top: 10px
}

.followup-empty {
    text-align: center;
    padding: 28px;
    color: var(--muted)
}

.followup-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 20px
}

.followup-summary button {
    font-size: 12px;
    padding: 10px 14px;
    background: white;
    border-color: var(--line)
}

.followup-summary button.is-selected {
    background: #edf4fd;
    border-color: #a8c6e7;
    color: var(--blue)
}

.followup-summary b {
    margin-left: 8px;
    font-weight: 650
}

.followup-summary button[onclick*="'overdue'"] b {
    color: var(--bad)
}

.followup-subject-cell {
    font-weight: 600;
    display: block;
    max-width: 245px
}

.followup-last-note {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    margin-top: 5px;
    max-width: 270px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.followup-date {
    white-space: nowrap
}

.row-actions {
    display: flex;
    gap: 8px;
    align-items: center
}

.row-actions button {
    padding: 5px 7px;
    font-size: 11px;
    white-space: nowrap
}

.followup-pending-label {
    display: block;
    font-size: 10px;
    color: var(--warn);
    margin-top: 5px
}

@media(min-width:901px) {
    body.sidebar-condensed .side .mv-sidebar-brand {
        padding: 0;
        max-width: 55px
    }

    body.sidebar-condensed .side .mv-sidebar-brand img {
        width: 55px;
        height: 55px
    }
}

@media(max-width:900px) {
    .side {
        width: var(--mobile-sidebar-width)
    }

    .top {
        height: 66px;
        padding: 0 16px
    }

    .top-location {
        display: block
    }

    .top-location span {
        font-size: 8px
    }

    .top-location strong {
        font-size: 12px
    }

    .top .right {
        gap: 6px
    }

    .top .right .primary .action-label {
        display: none
    }

    .workspace-identity {
        display: none
    }

    .wrap {
        padding: 24px 18px
    }
}

@media(max-width:560px) {
    .wrap {
        padding: 22px 14px
    }

    .heading h1 {
        font-size: 23px
    }

    .modalcover {
        padding: 12px 8px
    }

    .followup-form .modal {
        max-width: 100%;
        width: 100%
    }

    .modalbody,
    .modalhead {
        padding: 20px
    }

    .modalfoot {
        padding: 16px 20px;
        flex-wrap: wrap
    }

    .followup-form .interaction-fields {
        grid-template-columns: 1fr;
        gap: 15px
    }

    .followup-form .field,
    .followup-form .pdo-options {
        grid-column: 1
    }

    .followup-summary {
        display: grid;
        grid-template-columns: 1fr 1fr
    }

    .followup-summary button {
        display: flex;
        justify-content: space-between
    }

    .top .right>button {
        padding: 8px
    }

    .followup-form .contact-row {
        grid-template-columns: 1fr
    }

    .followup-form input,
    .followup-form select,
    .followup-form textarea {
        font-size: 16px !important
    }

    .group {
        border-radius: 10px
    }

    .form-intro {
        margin-bottom: 18px
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important
    }
}

body:has(.modalcover.show) {
    overflow: hidden
}

.followup-form .followup-record-date {
    grid-column: 1/-1
}

.followup-form .field>label {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted)
}

.toast {
    pointer-events: none
}
.side .brand {
    background: transparent;
}

.side .brand-logo {
    background: transparent;
    filter: brightness(0) invert(1);
}
/* Unified desktop header and mobile dropdown */

body.horizontal-navigation .shell {
    display: block;
}

body.horizontal-navigation #sidebar,
body.horizontal-navigation #sidebarToggle,
body.horizontal-navigation .top-location {
    display: none !important;
}

body.horizontal-navigation .app {
    width: 100%;
    min-width: 0;
    margin: 0;
}

body.horizontal-navigation .top {
    position: relative;
    top: auto;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 90px;
    padding: 0 28px;
    background: var(--bg);
    border: 0;
    box-shadow: none;
    overflow: visible;
}

#headerLogos {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

body.horizontal-navigation #headerLogos .brand {
    display: flex !important;
    align-items: center;
    margin: 0;
    padding: 0;
    min-height: 0;
    background: transparent;
    border: 0;
}

body.horizontal-navigation #headerLogos .brand-logo {
    display: block;
    width: 170px;
    max-width: 170px;
    height: auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    filter: none;
}

body.horizontal-navigation #headerLogos .mv-sidebar-brand {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    max-width: none;
    background: transparent;
    border: 0;
    border-radius: 0;
}

body.horizontal-navigation #headerLogos .mv-sidebar-brand img {
    display: block;
    width: 70px;
    max-width: 70px;
    height: 68px;
    object-fit: contain;
    filter: none;
}

body.horizontal-navigation #navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    gap: 6px;
}

body.horizontal-navigation #navigation .navcap {
    display: none;
}

body.horizontal-navigation #navigation > .navbtn,
body.horizontal-navigation .navigation-more > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 10px;
    color: #214b9b;
    background: transparent;
    border: 0;
    border-radius: 9px;
    box-shadow: none;
    cursor: pointer;
}

body.horizontal-navigation #navigation > .navbtn .nav-label {
    display: none;
}

body.horizontal-navigation .workspace-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

body.horizontal-navigation #navigation > .navbtn:hover,
body.horizontal-navigation .navigation-more > summary:hover,
body.horizontal-navigation #navigation > .navbtn.active,
body.horizontal-navigation .navigation-more > summary.active {
    color: #174699;
    background: #e6eefb;
}

body.horizontal-navigation .top .right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 0;
}

body.horizontal-navigation .top .right > button:not(.primary) {
    color: #214b9b;
    background: transparent;
    border: 0;
    box-shadow: none;
}

body.horizontal-navigation .workspace-person {
    display: none;
}

body.horizontal-navigation .workspace-avatar {
    color: #214b9b;
    background: #e6eefb;
}

body.horizontal-navigation .wrap {
    box-sizing: border-box;
    width: 100%;
max-width: none;
margin: 0;
    padding: 20px 28px 36px;
}

#mobileNavigationPanel,
#mobileNavigationToggle {
    display: none;
}

.navigation-more {
    position: relative;
    flex: 0 0 44px;
}

.navigation-more > summary {
    list-style: none;
}

.navigation-more > summary::-webkit-details-marker {
    display: none;
}

.navigation-more-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 45;
    box-sizing: border-box;
    width: 235px;
    max-height: 65vh;
    overflow-y: auto;
    padding: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 30px #112e4c18;
}

body.horizontal-navigation .navigation-more-menu .navbtn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    height: auto;
    min-height: 44px;
    margin: 2px 0;
    padding: 10px 12px;
    color: #214b9b;
    background: transparent;
    border: 0;
    border-radius: 8px;
    text-align: left;
}

body.horizontal-navigation .navigation-more-menu .nav-label {
    display: inline !important;
}

body.horizontal-navigation .navigation-more-menu .navbtn:hover,
body.horizontal-navigation .navigation-more-menu .navbtn.active {
    background: #e6eefb;
}

/* Mobile: top menu instead of bottom navigation */

@media (max-width: 900px) {
    body.horizontal-navigation .top {
        height: 80px;
        padding: 0 16px;
        gap: 12px;
        justify-content: space-between;
    }

    #headerLogos {
        gap: 14px;
    }

    body.horizontal-navigation #headerLogos .brand-logo {
        width: 140px;
        max-width: 140px;
    }

    body.horizontal-navigation #headerLogos .mv-sidebar-brand img {
        width: 48px;
        max-width: 48px;
        height: 54px;
    }

    body.horizontal-navigation #mobileNavigationToggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 8px;
        color: #214b9b;
        background: transparent;
        border: 0;
        box-shadow: none;
        flex-shrink: 0;
    }

    #mobileNavigationToggle .workspace-icon {
        width: 29px;
        height: 29px;
    }

    body.horizontal-navigation.mobile-navigation-open
    #mobileNavigationPanel {
        display: block;
        position: absolute;
        top: 100%;
        right: 12px;
        z-index: 45;
        box-sizing: border-box;
        width: min(330px, calc(100vw - 24px));
        max-height: calc(100dvh - 100px);
        overflow-y: auto;
        padding: 16px;
        background: var(--bg);
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: 0 10px 25px #112e4c20;
    }

    body.horizontal-navigation #navigation {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: 100%;
        min-height: 0;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    body.horizontal-navigation #navigation > .navbtn {
        display: flex;
        flex: none;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        width: 100%;
        height: auto;
        min-height: 50px;
        padding: 12px;
        color: #214b9b;
        border-radius: 7px;
        font-size: 15px;
        text-align: left;
    }

    body.horizontal-navigation #navigation > .navbtn .nav-label {
        display: inline !important;
        white-space: normal;
    }

    body.horizontal-navigation #mobileNavigationPanel .right {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
        margin: 12px 0 0;
        padding-top: 14px;
        border-top: 1px solid var(--line);
    }

    body.horizontal-navigation #mobileNavigationPanel
    .right > button {
        display: flex;
        align-items: center;
        gap: 8px;
        width: auto;
        height: auto;
        min-height: 42px;
        padding: 10px;
    }

    body.horizontal-navigation #mobileNavigationPanel .action-label {
        display: inline;
    }

    body.horizontal-navigation #mobileNavigationPanel .workspace-person {
        display: block;
        color: var(--ink);
    }

    body.horizontal-navigation .wrap {
        padding: 16px 12px 28px;
    }
}
/* Home greeting and Add button */

.home-welcome-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 12px 0 24px;
}

.home-greeting {
    min-width: 0;
}

;.home-greeting > div {
    margin: 0 !important;
}

.home-add-followup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Stable desktop navigation area */

@media (min-width: 901px) {
    body.horizontal-navigation .top {
        display: grid;
        grid-template-columns: 200px minmax(0, 1fr) auto;
        gap: 20px;
    }

    body.horizontal-navigation #navigation {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        min-width: 0;
        justify-content: flex-end;
        gap: 4px;
    }

    body.horizontal-navigation .top > .right {
        grid-column: 3;
        grid-row: 1;
        justify-content: flex-end;
        width: auto;
        min-width: 0;
        margin: 0;
        gap: 6px;
    }

    body.horizontal-navigation #headerLogos {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        justify-content: center;
        box-sizing: border-box;
        width: 200px;
        min-width: 0;
        margin: 0;
padding-right: 20px;
border-right: 1px solid #dfe5ec;
    }

    body.horizontal-navigation #headerLogos .brand-logo {
        width: 180px;
        max-width: 180px;
        height: auto;
    }

    body.horizontal-navigation .top .workspace-icon,
    body.horizontal-navigation .top .app-icon {
        width: 21px;
        height: 21px;
        stroke-width: 1.5;
    }

    body.horizontal-navigation #navigation > .navbtn,
    body.horizontal-navigation .navigation-more > summary,
    body.horizontal-navigation #headerAdminNavigation {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        box-sizing: border-box;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 10px;
        color: #214b9b;
        background: transparent;
        border: 0;
        border-radius: 8px;
        box-shadow: none;
    }

    body.horizontal-navigation #headerAdminNavigation .nav-label {
        display: none !important;
    }

    body.horizontal-navigation #navigation > .navbtn:hover,
    body.horizontal-navigation #navigation > .navbtn.active,
    body.horizontal-navigation #headerAdminNavigation:hover,
    body.horizontal-navigation #headerAdminNavigation.active,
    body.horizontal-navigation .navigation-more > summary:hover,
    body.horizontal-navigation .navigation-more > summary.active {
        background: #e6eefb;
    }

    body.horizontal-navigation .workspace-avatar {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }
}

/* Mobile menu actions: full rows */

@media (max-width: 900px) {
    body.horizontal-navigation #mobileNavigationPanel .right {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        gap: 6px;
        margin: 12px 0 0;
        padding-top: 14px;
    }

    body.horizontal-navigation #mobileNavigationPanel .right > button {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex: none;
        gap: 16px;
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 50px;
        box-sizing: border-box;
        padding: 12px;
        white-space: nowrap;
        text-align: left;
        font-size: 15px;
    }

    body.horizontal-navigation #mobileNavigationPanel .action-label {
        display: inline !important;
        white-space: nowrap;
        word-break: normal;
        overflow-wrap: normal;
    }

    body.horizontal-navigation #mobileNavigationPanel .workspace-identity {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 12px;
        box-sizing: border-box;
    }

    .home-welcome-row {
        flex-wrap: wrap;
        gap: 14px;
        margin: 8px 0 20px;
    }

    .home-greeting {
        flex: 1 1 100%;
    }

    .home-greeting > div {
        font-size: 23px !important;
    }

    .home-add-followup {
        min-height: 44px;
        padding: 10px 16px;
    }
}
/* Prevent page movement when the scrollbar appears */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}
@media (max-width: 900px) {
    body.horizontal-navigation .app,
    body.horizontal-navigation #main,
    body.horizontal-navigation #main > * {
        min-width: 0;
    }

    /* Keep wide tables inside their scroll area */
    .table-scroll {
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent automatic zoom when typing on iPhone */
    input,
    select,
    textarea {
        font-size: 16px;
    }

    /* Keep forms and dialogs within the screen */
    .modal {
        box-sizing: border-box;
        max-width: calc(100% - 24px);
        max-height: calc(100dvh - 24px);
    }

    #mobileNavigationPanel {
        overscroll-behavior-y: contain;
    }
}

@media (max-width: 380px) {
    body.horizontal-navigation #headerLogos {
        gap: 10px;
    }

    body.horizontal-navigation #headerLogos .brand-logo {
        width: 120px;
        max-width: 120px;
    }

    body.horizontal-navigation #headerLogos .mv-sidebar-brand img {
        width: 40px;
        max-width: 40px;
        height: 48px;
    }

    .config-nav {
        grid-template-columns: minmax(0, 1fr);
    }
}
/* Thin scrollbars */
html,
body * {
    scrollbar-width: thin;
    scrollbar-color: #b6c2d0 transparent;
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #b6c2d0;
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: #899bb0;
}

::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.pdo-action-followup {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    color: var(--muted);
    font-size: 12px;
}
.followup-summary {
    align-items: center;
}

.followup-summary .home-inline-search {
    box-sizing: border-box;
    flex: 0 1 310px;
    width: 310px;
    max-width: 100%;
    min-height: 44px;
}

@media (max-width: 600px) {
    .followup-summary .home-inline-search {
        flex: 1 1 100%;
        width: 100%;
    }
}
/* Full-width desktop header and content */
@media (min-width: 901px) {
    body.horizontal-navigation .top {
        height: 76px;
        width: 100%;
        max-width: none;
        margin: 0;
        box-sizing: border-box;
    }

    body.horizontal-navigation .wrap {
        width: 100%;
        max-width: none;
        margin: 0;
        padding-top: 18px;
        box-sizing: border-box;
    }
}

/* Consistent icon weight */
body.horizontal-navigation .workspace-icon {
    stroke-width: 1.5;
}

/* Greeting */
.home-welcome-row {
    margin: 8px 0 22px;
}

.home-greeting > div {
    color: #17324f;
    font-size: 24px !important;
    font-weight: 600 !important;
    line-height: 1.4;
}

.home-add-followup {
    min-height: 42px;
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 8px;
}

/* Search and grouped filters */
.followup-summary {
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.followup-summary .home-inline-search {
    flex: 0 1 310px;
    height: 42px;
    min-height: 42px;
    font-size: 13px;
}

.home-filter-tabs {
    display: inline-flex;
    margin-left: auto;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    background: #f1f4f8;
    border: 1px solid #e2e9f1;
    border-radius: 10px;
}

.followup-summary .home-filter-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 0;
    padding: 7px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #526780;
    font-size: 12px;
}

.followup-summary .home-filter-tabs button.is-selected {
    background: white;
    border-color: #dce5ef;
    color: #214b9b;
    box-shadow: 0 1px 3px #17324f0d;
}

.followup-summary .home-filter-tabs button:hover {
    color: #214b9b;
}

/* Empty Home table */
.table-scroll.is-home-empty {
    border: 0;
    background: #f8fafc;
    border-radius: 9px;
}

.table-scroll.is-home-empty thead {
    display: none;
}

.table-scroll.is-home-empty .tbl {
    min-width: 0;
    width: 100%;
}

.table-scroll.is-home-empty td.empty {
    padding: 30px 16px;
    border: 0;
    color: #71849c;
    text-align: center;
}

@media (max-width: 600px) {
    .home-greeting > div {
        font-size: 22px !important;
    }

    .followup-summary .home-inline-search {
        flex: 1 1 100%;
        width: 100%;
        font-size: 16px;
    }

    .home-filter-tabs {
        display: flex;
        width: 100%;
        box-sizing: border-box;
    }

    .followup-summary .home-filter-tabs button {
        flex: 1;
        padding-inline: 8px;
    }
}
.status-filter-tabs {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 4px;
    width: fit-content;
    margin-left: auto;
    padding: 4px;
    background: #f1f4f8;
    border: 1px solid #dfe7f1;
    border-radius: 14px;
}

.status-filter-tabs button {
    flex: 0 0 auto;
    min-height: 34px;
    margin: 0;
    padding: 7px 12px;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 7px;
    box-shadow: none !important;
    color: #526780;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.status-filter-tabs button:hover {
    color: #214b9b;
}

.status-filter-tabs button.is-selected {
    background: #fff !important;
    border-color: #dce5ef !important;
    color: #214b9b;
    box-shadow: 0 1px 3px #17324f0d !important;
}

@media (max-width: 600px) {
    .status-filter-tabs {
        max-width: 100%;
        box-sizing: border-box;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .status-filter-tabs button {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 12px;
    }
}
/* Status tabs counters - Finishing & Welcome Calls */

.status-filter-tabs button .pdo-status-count {
    display: inline-block;
    margin-left: 7px;
    font-size: 12px;
    font-weight: 700;
    color: #214B9B;
    font-variant-numeric: tabular-nums;
}

.status-filter-tabs button.is-selected .pdo-status-count {
    color: #214B9B;
}
/* Modern Dropdown Lists accordions */
.dropdown-accordion {
    overflow: hidden;
    padding: 0;
    border: 1px solid #e5eaf1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(22, 54, 94, 0.04);
}

.dropdown-accordion > summary {
    display: flex;
    flex-direction: row;
    direction: ltr;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    color: #263c57;
    transition: background-color 0.18s ease;
}

.dropdown-accordion > summary::-webkit-details-marker {
    display: none;
}

.dropdown-accordion > summary::marker {
    content: "";
}

.dropdown-accordion > summary h2,
.dropdown-accordion > summary h3 {
    margin: 0;
    line-height: 1.4;
}

.dropdown-accordion > summary h2 {
    font-size: 15px;
    font-weight: 650;
}

.dropdown-accordion > summary h3 {
    font-size: 13px;
    font-weight: 600;
}

.dropdown-accordion > summary::after {
    content: "";
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin-left: auto;
    margin-right: 4px;
    margin-top: -4px;
    border-right: 2px solid #8291a5;
    border-bottom: 2px solid #8291a5;
    transform: rotate(45deg);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.dropdown-accordion > summary:hover {
    background: #f7f9fc;
}

.dropdown-accordion[open] > summary {
    background: #f7f9fc;
    border-bottom: 1px solid #edf1f6;
}

.dropdown-accordion[open] > summary::after {
    margin-top: 4px;
    border-color: #214b9b;
    transform: rotate(225deg);
}

.dropdown-accordion-body {
    padding: 16px 18px;
}

.dropdown-accordion .dropdown-accordion {
    margin: 12px 0;
    border-color: #e8edf3;
    border-radius: 10px;
    box-shadow: none;
}

/* Modern Edit Option modal */
.dropdown-option-editor {
    display: grid;
    gap: 16px;
}

.dropdown-option-editor .field {
    gap: 8px;
}

.dropdown-option-editor .field input {
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d8e1ec;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.dropdown-option-editor .field input:focus {
    border-color: #78a0d5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 75, 155, 0.1);
}

.dropdown-option-editor h3 {
    margin: 4px 0 -8px;
    color: #193b67;
    font-size: 13px;
    font-weight: 650;
}

.dropdown-option-editor .options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin: 0;
}

.dropdown-option-editor .options label {
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 12px;
    gap: 10px;
    border: 1px solid #e0e7f0;
    border-radius: 10px;
    background: #f9fbfe;
    color: #334b68;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.dropdown-option-editor .options label:has(input:checked) {
    border-color: #a8c1e7;
    background: #eef4ff;
    color: #214b9b;
}

.dropdown-option-editor input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #214b9b;
}

.dropdown-option-active {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e0e7f0;
    border-radius: 10px;
    background: #f9fbfe;
    color: #334b68;
    cursor: pointer;
}

/* Dropdown tables: card rows, chips, and status badges */
.dropdown-accordion-body > .group-title {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.dropdown-accordion-body > .group-title button {
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid #214b9b;
    border-radius: 9px;
    background: #214b9b;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.dropdown-accordion .table-scroll {
    overflow-x: auto;
    padding: 0 3px 3px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.dropdown-accordion .tbl {
    width: 100%;
    min-width: 780px;
    border-collapse: separate;
    border-spacing: 0 8px;
    background: transparent;
    white-space: normal;
}

.dropdown-accordion .tbl th {
    padding: 13px 14px;
    border: 0;
    background: #f3f7fc;
    color: #6b7c92;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dropdown-accordion .tbl thead th:first-child {
    border-radius: 10px 0 0 10px;
}

.dropdown-accordion .tbl thead th:last-child {
    border-radius: 0 10px 10px 0;
    text-align: right;
}

.dropdown-accordion .tbl tbody td {
    padding: 13px 14px;
    border-top: 1px solid #e7edf4;
    border-bottom: 1px solid #e7edf4;
    background: #fff;
    color: #40536b;
    font-size: 12px;
    line-height: 1.5;
    vertical-align: middle;
    white-space: normal;
}

.dropdown-accordion .tbl tbody tr:hover td {
    background: #f8fbff;
}

.dropdown-accordion .tbl tbody td:first-child {
    border-left: 1px solid #e7edf4;
    border-radius: 10px 0 0 10px;
}

.dropdown-accordion .tbl tbody td:last-child {
    width: 80px;
    border-right: 1px solid #e7edf4;
    border-radius: 0 10px 10px 0;
    text-align: right;
    white-space: nowrap;
}

.dropdown-option-name {
    color: #263c57;
    font-weight: 650;
}

.dropdown-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dropdown-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border: 1px solid #e6edf5;
    border-radius: 7px;
    background: #f4f7fb;
    color: #526780;
    font-size: 10px;
    line-height: 1.35;
}

.dropdown-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.dropdown-status.is-active {
    background: #e9f7f1;
    color: #24815e;
}

.dropdown-status.is-inactive {
    background: #f2f4f7;
    color: #68778a;
}

.dropdown-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.dropdown-accordion .tbl button.link {
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid #dfe7f0;
    border-radius: 8px;
    background: #fff;
    color: #214b9b;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.dropdown-accordion .tbl button.link:hover {
    border-color: #abc1e1;
    background: #eef4ff;
}
/* Section heading and update button */
#modalBody .fin-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 20px;
}

#modalBody .fin-section-heading h2 {
    margin: 0;
    color: #17365b;
    font-size: 21px;
    font-weight: 700;
}

#modalBody .fin-add-update,
#modalBody .fin-add-update:hover,
#modalBody .fin-add-update:focus,
#modalBody .fin-add-update:active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 12px;
    background: #2874d0 !important;
    background-image: none !important;
    color: #fff;
    font-weight: 600;
    box-shadow: none !important;
    cursor: pointer;
}

/* Form stays inside the selected section */
#modalBody .fin-inline-editor {
    width: 100%;
    min-width: 0;
    margin: 0 0 24px;
    padding: 24px;
    box-sizing: border-box;
    border: 1px solid #cbdcf6;
    border-top: 4px solid #2874d0;
    border-radius: 16px;
    background: #f5f9ff;
}

#modalBody .fin-inline-editor[data-update-kind="stages"] {
    margin-top: 20px;
    border-color: #d5e4f7;
    border-top-color: #2874d0;
    background: #f5f9ff;
}

#modalBody .fin-inline-editor > .group {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

#modalBody .fin-inline-editor .group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

#modalBody .fin-inline-editor .group-title h2 {
    margin: 0;
    color: #17365b;
    font-size: 19px;
}

/* Fix the half-width form */
#modalBody .fin-inline-editor .grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    min-width: 0;
}

#modalBody .fin-inline-editor [data-fin-update-fields],
#modalBody .fin-inline-editor .wide,
#modalBody .fin-inline-editor .fin-report,
#modalBody .fin-inline-editor .pdo-options {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
}

#modalBody .fin-inline-editor .field {
    min-width: 0;
}

#modalBody .fin-inline-editor textarea,
#modalBody .fin-inline-editor select,
#modalBody .fin-inline-editor input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cfdaea;
    border-radius: 10px;
    background: #fff;
}

#modalBody .fin-inline-editor textarea {
    min-height: 100px;
    padding: 12px 14px;
    resize: vertical;
}

#modalBody .fin-inline-editor :is(
    textarea, select, input
):focus-visible {
    outline: 3px solid #bfdbfe;
    outline-offset: 2px;
}

/* Performance report cards */
#modalBody .fin-inline-editor .fin-new-observation {
    padding: 20px;
    border: 1px solid #dbe5f2;
    border-radius: 12px;
    background: #fff;
}

#modalBody .fin-inline-editor .fin-report-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#modalBody .fin-inline-editor .fin-report-choices label {
    flex: 1 1 180px;
    margin: 0;
    cursor: pointer;
}

#modalBody .fin-inline-editor .fin-report-choices label span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 14px;
    box-sizing: border-box;
    border: 1px solid #d7e1ef;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    text-align: center;
}

#modalBody .fin-inline-editor
.fin-report-choices label:has(input:checked) span {
    border-color: #2874d0;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

#modalBody .fin-inline-editor
.fin-report-choices label:has(
    input[value="compliant"]:checked
) span {
    border-color: #10b981;
    background: #ecfdf5;
    color: #047857;
}

#modalBody .fin-inline-editor
.fin-report-choices label:has(
    input[value="observations"]:checked
) span {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
}

#modalBody .fin-inline-editor
.fin-report-choices label:has(
    input[value="violation"]:checked
) span {
    border-color: #ef4444;
    background: #fef2f2;
    color: #b91c1c;
}

/* Footer */
#modalBody .fin-editor-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #dbe5f2;
}

#modalBody .fin-editor-actions .primary {
    min-height: 44px;
    padding: 10px 22px;
    border: 0;
    border-radius: 10px;
    background: #2874d0;
    color: #fff;
    font-weight: 600;
}

#modalBody [data-update-kind="stages"]
.fin-editor-actions .primary {
    background: #2874d0;
    color: #fff;
}

#modalBody .fin-editor-close {
    padding: 7px 12px;
    border: 1px solid #ccd8e8;
    border-radius: 8px;
    background: #fff;
    color: #526580;
    cursor: pointer;
}

/* Preserve hidden fields */
#modalBody .fin-inline-editor[hidden],
#modalBody .fin-inline-editor [hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    #modalBody .fin-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    #modalBody .fin-inline-editor {
        padding: 16px;
    }

    #modalBody .fin-inline-editor .grid2 {
        grid-template-columns: minmax(0, 1fr);
    }

    #modalBody .fin-add-update,
    #modalBody .fin-editor-actions .primary {
        width: 100%;
    }
}
#modalBody .fin-fac-date {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin: 14px 0 0 26px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #7489a8;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    white-space: nowrap;
}

#modalBody .fin-fac-date > span,
#modalBody .fin-fac-date time {
    color: inherit;
    font-size: inherit;
    font-weight: 400;
}
#modalBody .fin-stage-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-left: auto;
    padding: 7px 12px;
    border: 1px solid #d5e4f7;
    border-radius: 8px;
    background: #f0f6fd;
    color: #2874d0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
}

#modalBody .fin-stage-toggle:hover {
    background: #e3effc;
    border-color: #2874d0;
}

#modalBody .fin-stage-toggle:focus-visible {
    outline: 2px solid #2874d0;
    outline-offset: 3px;
}

#modalBody .fin-stage-history[hidden] {
    display: none !important;
}