
        /* PDO Touchpoints — organized build: base → layout → components → modals → responsive */
        :root {
            --navy: #0d2f63;
            --blue: #1f6feb;
            --darkblue: #164b93;
            --bg: #f4f5f6;
            --paper: #fff;
            --line: #e3e8ef;
            --ink: #273445;
            --muted: #738093;
            --soft: #f8fafc;
            --good: #277c55;
            --warn: #a86a1b;
            --bad: #bd4848;
            --shadow: 0 3px 14px rgba(16, 39, 75, .035)
        }

        * {
            box-sizing: border-box
        }

        body {
            margin: 0;
            background: var(--bg);
            color: var(--ink);
            font: 13px 'Segoe UI', Tahoma, Arial, sans-serif
        }

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

        button {
            cursor: pointer;
            background: #fff;
            border: 1px solid #d6e0ea;
            border-radius: 6px;
            padding: 8px 12px;
            color: var(--ink)
        }

        button:hover {
            background: #f1f6fd;
            border-color: #b8cbe3
        }


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

        .primary:hover {
            background: var(--darkblue);
            color: white
        }

        .subtle {
            background: var(--soft)
        }

input,
textarea {
    border: 1px solid #d6e0ea;
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
    color: var(--ink);
    min-width: 0
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]) {
    box-sizing: border-box;
    height: 36px;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 13px;
}

select {
    height: 36px;
    min-height: 36px;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    padding: 6px 10px;
    background: #fff;
    color: #273445;
    min-width: 0;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 13px
}

input:focus,
textarea:focus,
button:focus-visible {
    outline: 2px solid #8cb9f1;
    outline-offset: 1px
}

select:focus {
    border-color: #1f6feb;
    outline: 3px solid #e9f1ff;
    outline-offset: 0
}

        textarea {
            resize: vertical;
            width: 100%;
            line-height: 1.5
        }

        input[type=checkbox] {
            accent-color: var(--blue)
        }

        label {
            font-size: 11px;
            font-weight: 600;
            color: #526072
        }

        .shell {
            display: flex;
            min-height: 100vh
        }

        .side {
            width: 190px;
            flex: none;
            background: var(--navy);
            color: #fff;
            position: sticky;
            top: 0;
            height: 100vh;
            padding: 19px 12px;
            overflow: auto
        }

.brand {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3px 11px 17px;
    border-bottom: 1px solid #ffffff24;
    margin-bottom: 18px;
}

.brand-logo {
    display: block;
    width: 100%;
    max-width: 136px;
    height: auto;
    object-fit: contain;
    box-sizing: border-box;
    padding: 5px 7px;
    background: #fff;
    border-radius: 7px;
}

        .navcap {
            color: #8eaad0;
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 1.3px;
            margin: 20px 10px 7px
        }

        .navbtn {
            display: flex;
            align-items: center;
            gap: 11px;
            text-align: left;
            border: 0;
            width: 100%;
            color: #e0eaf8;
            background: transparent;
            font-size: 12px;
            padding: 10px 12px;
            margin: 2px 0;
            border-radius: 6px
        }

        .navbtn:hover,
        .navbtn.active {
            background: #1b4c90;
            color: #fff
        }


        .sidefoot {
            border-top: 1px solid #ffffff24;
            color: #a5bfdf;
            padding: 15px 10px;
            font-size: 10px;
            margin-top: 26px;
            line-height: 1.65
        }

        .app {
            flex: 1;
            min-width: 0
        }

        .top {
            height: 53px;
            background: #fff;
            border-bottom: 1px solid var(--line);
            display: flex;
            align-items: center;
            gap: 13px;
            padding: 0 25px;
            position: sticky;
            top: 0;
            z-index: 5
        }


        .right {
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 10px
        }

        .top .app-icon,
        .top .nav-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
            fill: none;
            stroke: currentColor;
            stroke-width: 1.8;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .top .app-icon {
            display: none;
        }

        .top .nav-icon {
            display: block;
        }

        .top select {
            max-width: 190px
        }

        .bell {
            position: relative;
            padding: 8px 12px
        }

        .dot {
            display: inline-block;
            width: 7px;
            height: 7px;
            background: var(--blue);
            border-radius: 50%;
            margin-left: 4px
        }

        .avatar {
            width: 31px;
            height: 31px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            background: #e9f1fd;
            color: #1755a1;
            font-weight: 700
        }

        .demo {
            font-size: 10px;
            color: #667c96;
            background: #eef4fb;
            border-bottom: 1px solid #dfe8f3;
            padding: 7px 25px
        }

        .wrap {
            width: 100%;
            max-width: none;
            margin: 0;
            padding: 19px 22px 44px;
        }

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

        .eyebrow {
            font-size: 10px;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            color: #8290a2;
            margin-bottom: 7px
        }

        .heading h1 {
            font-size: 21px;
            letter-spacing: -.5px;
            font-weight: 620;
            color: var(--navy);
            margin: 0 0 6px
        }

        .heading p {
            font-size: 12px;
            color: var(--muted);
            margin: 0;
            line-height: 1.5
        }

        .group {
            background: #fff;
            border: 1px solid var(--line);
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 14px;
            box-shadow: var(--shadow)
        }

        .group h2 {
            font-size: 13px;
            font-weight: 650;
            margin: 0 0 13px;
            color: #263c57
        }

        .group-title {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px
        }

        .group-title h2 {
            margin: 0
        }

        .hint {
            color: var(--muted);
            font-size: 11px;
            line-height: 1.65
        }

        .muted {
            color: var(--muted)
        }

        .minor {
            font-size: 11px
        }

        .metrics {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            border: 1px solid var(--line);
            border-radius: 8px;
            background: #fff;
            margin-bottom: 18px;
            overflow: hidden
        }

        .metric {
            padding: 17px 19px;
            border-right: 1px solid var(--line);
            cursor: pointer
        }

        .metric:last-child {
            border: 0
        }

        .metric:hover {
            background: #f7faff
        }

        .metric small {
            font-size: 11px;
            color: var(--muted)
        }

        .metric strong {
            display: block;
            color: #173d73;
            font-weight: 620;
            font-size: 25px;
            margin-top: 7px
        }

        .columns {
            display: grid;
            grid-template-columns: 1.35fr .85fr;
            gap: 16px
        }

        .line {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            padding: 11px 1px;
            border-bottom: 1px solid var(--line)
        }

        .line:last-child {
            border: 0
        }

        .link {
            background: transparent;
            border: 0;
            padding: 1px;
            color: #1657a6;
            text-align: left
        }

        .pill {
            font-size: 10px;
            font-weight: 650;
            padding: 4px 8px;
            border-radius: 5px;
            background: #eef3f9;
            color: #5a6e86;
            white-space: nowrap
        }

        .pill.open,
        .pill.sent,
        .pill.new {
            background: #eaf2ff;
            color: #175cc5
        }

        .pill.progress,
        .pill.accept {
            background: #e7f0fc;
            color: #245e9f
        }

        .pill.pending,
        .pill.clarify {
            background: #fff4df;
            color: #9c681c
        }

        .pill.resolved,
        .pill.completed {
            background: #e8f5ee;
            color: #24774e
        }

        .pill.urgent {
            background: #feeeee;
            color: #a93434
        }

        .tools {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 13px
        }

        .tools input {
            width: 230px
        }

        .tools select {
            max-width: 190px
        }

        .tabs {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            border-bottom: 1px solid #e2e9f3;
            margin: 0 0 12px;
            padding-bottom: 8px
        }

        .tabs button {
            font-size: 11px;
            padding: 7px 11px;
            border-radius: 8px 8px 0 0
        }


        .table-scroll {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow: auto;
            overscroll-behavior-x: contain;
            border: 1px solid var(--line);
            border-radius: 7px;
        }

        .tbl {
            width: 100%;
            border-collapse: collapse;
            background: #fff;
            white-space: nowrap
        }

        .tbl th {
            text-align: left;
            background: #f9fbfd;
            color: #728094;
            letter-spacing: .5px;
            font-size: 10px;
            text-transform: uppercase
        }

        .tbl td {
            font-size: 11.5px
        }

        .tbl th,
        .tbl td {
            padding: 12px 13px;
            border-bottom: 1px solid var(--line)
        }

        .tbl tr:last-child td {
            border: 0
        }

        .tbl tbody tr:hover td {
            background: #fafcff
        }

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

        .grid3 {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 13px
        }

        .field {
            display: flex;
            flex-direction: column;
            gap: 6px
        }

.field input {
    width: 100%
}

.field select {
    width: 100%
}

        .field.wide {
            grid-column: 1/-1
        }

        .smallhead {
            font-size: 12px;
            font-weight: 650
        }

        .box-note {
            background: #f8fafc;
            border-left: 3px solid #adc6e9;
            padding: 11px 13px;
            color: #51657d;
            font-size: 11px;
            line-height: 1.6;
            margin: 12px 0
        }

        .config-nav {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 11px
        }

        .config-tile {
            min-height: 100px;
            text-align: left;
            padding: 15px;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 8px
        }

        .config-tile strong {
            font-size: 12px
        }

        .config-tile small {
            line-height: 1.5;
            font-size: 10.5px;
            color: var(--muted)
        }

        .options {
            display: flex;
            gap: 13px;
            flex-wrap: wrap;
            margin: 8px 0
        }

        .options label {
            display: flex;
            align-items: center;
            gap: 7px;
            font-weight: 450;
            font-size: 12px;
            color: var(--ink)
        }

        .setting {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 0;
            border-bottom: 1px solid var(--line)
        }

        .setting:last-child {
            border: 0
        }

        .setting label {
            font-size: 12px;
            color: var(--ink)
        }

        .setting select {
            max-width: 250px
        }

        .form-compact {
            max-width: 820px
        }

        .callout {
            padding: 10px 12px;
            background: #f3f7fc;
            border: 1px solid #dde9f7;
            border-radius: 6px;
            font-size: 11px;
            color: #4e6682
        }

        .modalcover {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 50;
            background: #0c244768;
            align-items: center;
            justify-content: center;
            padding: 16px
        }

        .modalcover.show {
            display: flex
        }

        .modal {
            width: min(850px, 97vw);
            max-height: 92vh;
            overflow: auto;
            background: #fff;
            border-radius: 13px;
            clip-path: inset(0 round 13px);
            box-shadow: 0 25px 75px #0b28433b
        }

.modalhead {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 21px;
    border-bottom: 1px solid var(--line);
    background: #fff
}

        .modalhead h2 {
            font-size: 16px;
            color: #143b72;
            margin: 0
        }

        .modalbody {
            padding: 20px 21px
        }

        .modalfoot {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
            border-top: 1px solid var(--line);
            padding: 13px 21px
        }

        .timeline {
            border-left: 1px solid #c9d9eb;
            margin-left: 8px;
            padding-left: 19px
        }
                .pdo-history-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            border-bottom: 1px solid #e2e9f3;
            margin-bottom: 12px;
            padding-bottom: 8px;
        }

        .pdo-history-toolbar > .tabs {
            border-bottom: 0;
            margin: 0;
            padding-bottom: 0;
            flex: 0 1 auto;
        }

        .pdo-history-contacts {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            align-items: center;
            gap: 6px;
            margin-left: auto;
            min-width: 0;
        }

        .pdo-contact-card {
            display: grid;
            grid-template-columns: auto auto;
            grid-template-rows: auto auto;
            align-items: center;
            column-gap: 14px;
            row-gap: 3px;
            min-width: 0;
            max-width: 100%;
            padding: 7px 10px;
            border: 1px solid #dce5f0;
            border-radius: 9px;
            background: #fff;
            text-align: left;
        }

        .pdo-contact-card-name {
            grid-column: 1;
            grid-row: 1;
            color: #253247;
            font-size: 12px;
            font-weight: 700;
            overflow-wrap: anywhere;
        }

        .pdo-contact-card-role {
            grid-column: 1;
            grid-row: 2;
            margin-top: 0;
            color: #718096;
            font-size: 10px;
        }

         .pdo-contact-card-bottom {
            grid-column: 2;
            grid-row: 1 / 3;
            display: flex;
            align-items: center;
            gap: 7px;
            margin-top: 0;
        }

        .pdo-contact-card-phone {
            color: #253247;
            font-size: 11px;
            text-decoration: none;
            white-space: nowrap;
        }

        .pdo-contact-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            flex-shrink: 0;
            border: 1px solid #dce5f0;
            border-radius: 7px;
            background: #fff;
            color: #1670ef;
            text-decoration: none;
        }

        .pdo-contact-icon:hover {
            background: #eef5ff;
            border-color: #9bbcf0;
        }

        .pdo-contact-icon svg {
            width: 15px;
            height: 15px;
        }

        .pdo-event-heading,
        .pdo-event-meta {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            gap: 12px;
        }
        .pill.pdo-history-muted {
            background: #f0f2f5;
            color: #7b8492;
        }
                .pdo-event-heading {
            align-items: center;
        }

        .pdo-history-add {
            flex-shrink: 0;
            font-size: 11px;
            padding: 6px 10px;
            white-space: nowrap;
        }
                .pdo-action-strip {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex: 1;
            min-width: 0;
            min-height: 32px;
            padding: 5px 10px;
            border-radius: 7px;
        }

        .pdo-action-strip > b {
            min-width: 0;
            overflow-wrap: anywhere;
        }

        .pdo-action-strip.is-active {
            background: #f0f6ff;
        }

        .pdo-action-strip.is-pending {
            background: #fff8ec;
        }

        .pdo-action-strip.is-closed {
            background: #edf7f1;
        }

        .pdo-action-strip.is-history {
            background: #f5f6f8;
        }
        .pdo-event-state {
            margin-left: auto;
            flex-shrink: 0;
            color: #526780;
            font-size: 10px;
            font-weight: 600;
        }
.pdo-history-current-state {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.pdo-team-workload {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.pdo-workload-person {
    padding: 12px 14px;
    border: 1px solid #e1e7ef;
    border-radius: 9px;
    background: #fff;
}

.pdo-workload-person > strong {
    display: block;
    margin-bottom: 9px;
    color: #173f70;
    font-size: 13px;
}

.pdo-workload-line {
    display: grid;
    grid-template-columns:
        80px minmax(90px,1fr) 58px;
    align-items: center;
    gap: 10px;
    margin-top: 7px;
    color: #64748b;
    font-size: 11px;
}

.pdo-workload-line > b {
    color: #334155;
    text-align: right;
    white-space: nowrap;
}

.pdo-workload-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf1f6;
}

.pdo-workload-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.pdo-workload-fill.interactions {
    background: #2e6db4;
}

.pdo-workload-fill.finishing {
    background: #2f8f6b;
}

@media (max-width: 600px) {
    .pdo-workload-line {
        grid-template-columns:
            72px minmax(70px,1fr) 52px;
        gap: 7px;
    }
}
        .pdo-event-meta > time {
            margin-left: auto;
            flex-shrink: 0;
            white-space: nowrap;
        }

        .pdo-event-meta > span {
            min-width: 0;
            overflow-wrap: anywhere;
        }

        @media (max-width: 600px) {
            .pdo-history-toolbar {
                flex-wrap: wrap;
            }

            .pdo-history-contacts {
                width: 100%;
            }
        }

        .event {
            position: relative;
            padding: 0 0 18px
        }

        .event:before {
            content: '';
            position: absolute;
            left: -24px;
            top: 3px;
            width: 8px;
            height: 8px;
            background: #fff;
            border: 2px solid #4787d3;
            border-radius: 50%
        }

        .event b {
            font-size: 11px
        }

        .event p {
            margin: 5px 0;
            font-size: 11px;
            line-height: 1.6
        }

        .event small {
            color: var(--muted);
            font-size: 10px
        }

        .toast {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: var(--navy);
            color: #fff;
            border-radius: 7px;
            padding: 12px 17px;
            font-size: 12px;
            display: none;
            z-index: 90
        }

        .empty {
            text-align: center;
            padding: 30px 18px;
            color: var(--muted);
            font-size: 12px
        }

        .tag {
            font-size: 10px;
            border: 1px solid var(--line);
            border-radius: 5px;
            padding: 5px 8px;
            color: var(--muted)
        }

        .preview {
            border: 1px dashed #bed0e7;
            background: #f9fbfe;
            padding: 13px;
            border-radius: 7px
        }

        .admin-switch {
            display: flex;
            gap: 9px;
            flex-wrap: wrap
        }

        .admin-switch button.active {
            background: #eaf2ff;
            border-color: #b9cfee;
            color: #164b93
        }

        .under {
            font-size: 10px;
            color: var(--muted);
            margin-top: 7px
        }

        .hidden {
            display: none !important
        }

        @media(max-width:930px) {
            .side {
                width: 185px
            }

            .columns {
                grid-template-columns: 1fr
            }

            .config-nav {
                grid-template-columns: repeat(2, 1fr)
            }

            .top {
                padding: 0 14px
            }

            .wrap {
                padding: 22px 16px
            }
        }

@media(max-width:700px) {
    .shell {
        --mobile-sidebar-width: min(
            220px,
            calc(100vw - 76px)
        );

        width: 100%;
        min-width: 0;
        overflow-x: clip;
    }

    .side {
        display: block;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 40;

        box-sizing: border-box;
        width: var(--mobile-sidebar-width);
        max-width: none;

        height: 100vh;
        height: 100dvh;

        overflow-y: auto;
        overscroll-behavior: contain;

        padding-bottom: max(
            19px,
            env(safe-area-inset-bottom)
        );

        visibility: hidden;
        transform: translateX(-100%);
    }

    .side.mobile-open {
        visibility: visible;
        transform: translateX(0);
        box-shadow: 8px 0 28px #0c244733;
    }

    .shell > .app {
        flex: 0 0 100%;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        transform: translateX(0);
    }

    .side.mobile-open ~ .app {
        transform: translateX(
            var(--mobile-sidebar-width)
        );
    }

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

    .metric:nth-child(2) {
        border-right: 0
    }

    .metric:nth-child(-n+2) {
        border-bottom: 1px solid var(--line)
    }

    .grid2,
    .grid3,
    .config-nav {
        grid-template-columns: 1fr
    }

    .top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        height: 60px;
        min-height: 60px;
        gap: 8px;
        padding: 8px;
        box-sizing: border-box;
    }

    .top > button,
    .top .right > button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 10px;
    }

    .top .right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        min-width: 0;
        margin: 0 0 0 auto;
        gap: 6px;
    }

    .top .action-label {
        display: none;
    }

    .top .app-icon {
        display: block;
    }

    .top select {
        max-width: 165px
    }

    .wrap {
        padding: 18px 13px
    }

    .tools input,
    .tools select {
        width: 100%;
        max-width: none;
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]) {
        height: 44px;
        min-height: 44px;
        font-size: 16px;
        scroll-margin-block: 100px;
    }

    select {
        height: 44px;
        min-height: 44px;
        font-size: 16px;
    }

    .field > input,
    .field > select,
    .field > textarea {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    input[type="date"] {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        min-inline-size: 0;
        max-width: 100%;
        -webkit-appearance: none;
        appearance: none;
    }

    input[type="date"]::-webkit-date-and-time-value {
        min-height: 1em;
        text-align: left;
    }

    textarea {
        min-height: 88px;
        font-size: 16px;
        line-height: 1.5;
        scroll-margin-block: 100px;
    }

    input[type="file"] {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
    }

    .top button,
    .tools button,
    .actions button,
    .group-title button,
    .pdo-options-buttons button,
    .modalhead button,
    .modalbody button,
    .tabs button,
    .navitem {
        min-height: 44px;
    }

    .group,
    .field,
    .grid2,
    .grid3,
    #serverRows,
    #unitHistoryBody {
        min-width: 0;
        max-width: 100%;
    }

    .row,
    .actions,
    .pdo-options-buttons {
        flex-wrap: wrap;
    }

    .row > *,
    .actions > *,
    .pdo-options-buttons > * {
        min-width: 0;
        max-width: 100%;
    }

    .timeline p,
    .pdo-history-file,
    .pdo-event-meta {
        overflow-wrap: anywhere;
    }

    .heading {
        flex-wrap: wrap;
        align-items: flex-start
    }

    .heading > div:first-child {
        min-width: 0;
        flex: 1 1 100%
    }

    .heading > button {
        max-width: 100%
    }

    .group-title {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 8px
    }

    .contact-row {
        grid-template-columns: minmax(0, 1fr)
    }

    .modalcover {
        padding: 8px
    }

    .modal {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px)
    }

    .modalbody {
        padding: 14px
    }

    .modalhead {
        padding: 13px
    }

    .modalfoot {
        flex-wrap: wrap;
        padding: 12px 14px
    }

    .modalfoot > button {
        flex: 1 1 auto;
        min-height: 44px
    }
}

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

        .row:last-child {
            border: 0
        }


        .actions {
            display: flex;
            gap: 9px;
            flex-wrap: wrap;
            margin-top: 12px
        }


        .tabs button.active {
            background: #eaf2ff;
            color: #174a92;
            border-color: #a4bddd
        }

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

        input[type="file"] {
            max-width: 100%
        }

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

        .minor-action {
            border: 0;
            background: transparent;
            color: #586b84
        }

        .step-dot {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            border: 2px solid #b6c0ce;
            display: inline-block;
            flex-shrink: 0
        }

        .step-dot.done {
            background: #2d9360;
            border-color: #2d9360
        }

        .step-dot.active {
            background: #1f6feb;
            border-color: #1f6feb
        }

        .stage-line {
            display: flex;
            gap: 12px;
            align-items: flex-start;
            padding: 13px 0;
            border-bottom: 1px solid #e8edf3
        }

        .stage-line:last-child {
            border: 0
        }


        .metric.selected {
            outline: 2px solid #a5c5f3;
            background: #eff6ff
        }

        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 7px;
            margin-top: 16px
        }

 

        .hint-label {
            color: #78899c;
            font-size: 11px
        }

        .home-greeting {
            font-size: 13px;
            color: #6f7f90;
            margin-bottom: 4px
        }

        .contact-row {
            display: grid;
            grid-template-columns: 1fr 1.3fr 1.3fr auto;
            gap: 9px;
            margin: 9px 0
        }

.contact-row input {
    width: 100%
}

.contact-row select {
    width: 100%
}


        .count-bad {
            color: #b83d3d;
            font-weight: 650
        }

        .count-warn {
            color: #9b661b;
            font-weight: 650
        }

        .count-good {
            color: #1f61b6;
            font-weight: 650
        }

        @media(max-width:760px) {
            .contact-row {
                grid-template-columns: 1fr 1fr
            }
        }

        /* PDO approved visual system: compact classic layout (browser stays at 100%). */
        :root {
            --pdo-radius: 11px
        }


        .group {
            border-radius: 11px
        }

        .top {
            position: sticky;
            top: 0;
            z-index: 35
        }

        .case-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 18px;
            margin-bottom: 11px
        }

        .case-identity {
            display: flex;
            align-items: center;
            gap: 13px;
            flex-wrap: wrap
        }

        .case-identity b,
        .case-identity span {
            border: 1px solid #dce5f0;
            background: #f8fbff;
            border-radius: 12px;
            padding: 9px 15px;
            color: #153c72;
            font-size: 12px
        }

        .case-identity span {
            font-weight: 500;
            color: #4d647f
        }

        .action-in-panel {
            display: flex;
            justify-content: flex-end;
            margin-top: 14px
        }


        .modalhead {
            gap: 10px
        }


        /* Interaction header identity */
        .modalhead .header-identity {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-left: 6px;
            margin-right: auto;
        }

        .modalhead .header-identity b,
        .modalhead .header-identity span {
            border: 1px solid #dce5f0;
            background: #f8fbff;
            border-radius: 12px;
            padding: 8px 14px;
            font-size: 12px;
            white-space: nowrap;
        }

        .modalhead .header-identity b {
            color: #153c72;
            font-weight: 650;
        }

        .modalhead .header-identity span {
            color: #4d647f;
            font-weight: 500;
        }
        .modalhead .header-status {
    display: flex;
    align-items: center;
    margin-right: 12px;
}


        @media(max-width:700px) {
            .modalhead {
                position: relative;
                display: flex;
                flex-wrap: wrap;
                align-items: center;
                justify-content: center;
                gap: 7px;
                padding: 12px 56px;
                text-align: center;
            }

            .modalhead h2 {
                flex: 1 1 100%;
                min-width: 0;
                margin: 0;
                font-size: 16px;
                text-align: center;
                overflow-wrap: anywhere;
            }

            .modalhead .header-identity {
                display: flex;
                flex: 1 1 100%;
                justify-content: center;
                align-items: center;
                flex-wrap: wrap;
                min-width: 0;
                max-width: 100%;
                margin: 0;
                gap: 5px;
            }

            .modalhead .header-identity b,
            .modalhead .header-identity span {
                min-width: 0;
                max-width: 100%;
                padding: 5px 8px;
                border-radius: 8px;
                font-size: 11px;
                white-space: normal;
                overflow-wrap: anywhere;
            }

            .modalhead .header-status {
                justify-content: center;
                flex-wrap: wrap;
                max-width: 100%;
                margin: 0;
            }

            .modalhead > span,
            .modalhead > div {
                min-width: 0;
                max-width: 100%;
                font-size: 11px;
                text-align: center;
                overflow-wrap: anywhere;
            }

            .modalhead > button.pdo-unit-history {
                min-height: 36px;
                margin: 0;
                padding: 6px 9px;
                font-size: 11px;
            }

            .modalhead > button[aria-label="Close dialog"] {
                position: absolute;
                top: 10px;
                right: 8px;
                width: 44px;
                height: 44px;
                min-height: 44px;
                margin: 0;
                padding: 0;
            }

            .pdo-history-contacts {
                justify-content: center;
            }

            .pdo-contact-card {
                max-width: 100%;
                margin-inline: auto;
            }
        }
        .modalhead > .pdo-unit-history {
            margin-left: auto;
            flex-shrink: 0;
            padding: 7px 12px;
            font-size: 11px;
            white-space: nowrap;
        }

        .modalhead > .pdo-unit-history + button:last-child {
            margin-left: 0;
        }
        .modalhead>button:last-child {
            order: 4
        }

        .modalfoot>button {
            min-width: 78px
        }

        @media(max-width:700px) {
            .case-info {
                align-items: flex-start;
                flex-direction: column
            }

            .case-identity {
                gap: 7px
            }
        }
        

/* Responsive Create Interaction */

.modal:has(.interaction-one-page) {
    width: min(760px, 96vw);
    max-height: 94dvh;
    overflow-y: auto;
}

.modal:has(.interaction-one-page) 
.modalhead {
    padding: 14px 20px;
}

.modal:has(.interaction-one-page) .modalbody {
    padding: 18px 20px;
}

.modal:has(.interaction-one-page) .modalfoot {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 12px 20px;
}

.interaction-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    align-items: start;
}

.interaction-one-page .field {
    min-width: 0;
    gap: 6px;
}

.interaction-one-page .field label {
    font-size: 12px;
}

.interaction-one-page input:not([type="file"]),
.interaction-one-page select {
    width: 100%;
    min-width: 0;
    height: 36px;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 13px;
}

.interaction-one-page textarea {
    width: 100%;
    min-width: 0;
    min-height: 76px;
    padding: 10px 12px;
    font-size: 16px;
    resize: vertical;
}

.interaction-notes,
.interaction-contact,
.interaction-attachment {
    grid-column: 1 / -1;
}

.modal .field[hidden] {
    display: none !important;
}

.interaction-one-page .contact-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.2fr auto;
    gap: 8px;
    margin: 8px 0;
}

.interaction-one-page .contact-row button {
    padding: 8px 10px;
}

/* Mobile */

@media (max-width: 600px) {
    .modalcover {
        padding: 8px;
    }

    .modal:has(.interaction-one-page) {
        width: 100%;
        max-width: 100%;
        max-height: 96dvh;
    }

    .modal:has(.interaction-one-page) .modalhead,
    .modal:has(.interaction-one-page) .modalbody,
    .modal:has(.interaction-one-page) .modalfoot {
        padding-left: 14px;
        padding-right: 14px;
    }

    .interaction-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 13px;
    }

    .interaction-notes,
    .interaction-contact,
    .interaction-attachment {
        grid-column: 1;
    }

    .interaction-one-page .contact-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .interaction-one-page textarea {
        font-size: 16px;
    }
}


        /* Compact optional inputs and timeline presentation */
                #wcContactRows .contact-row {
            display: grid;
            grid-template-columns:
                minmax(100px, 0.8fr)
                minmax(0, 1fr)
                minmax(0, 1fr)
                auto;
            gap: 8px;
            margin-bottom: 10px;
            align-items: center;
        }

        #wcContactRows .contact-row input,
        #wcContactRows .contact-row select {
            width: 100%;
            min-width: 0;
        }

        @media (max-width: 600px) {
            #wcContactRows .contact-row {
                grid-template-columns: minmax(0, 1fr);
            }
        }
        .pdo-options {
            grid-column: 1 / -1;
            min-width: 0;
        }

        .pdo-options-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: flex-start;
        }

        .pdo-options-buttons > button {
            width: auto;
            flex: 0 0 auto;
            min-height: 34px;
            padding: 7px 12px;
            border: 1px solid #d5dfec;
            border-radius: 7px;
            background: #fff;
            color: #18477e;
            font-size: 12px;
            font-weight: 600;
            line-height: 1.4;
            cursor: pointer;
        }

        .pdo-options-buttons > button:hover {
            border-color: #8aaee0;
            background: #f6f9fd;
        }

        .pdo-options-buttons > button[aria-expanded="true"] {
            border-color: #2563eb;
            background: #eef5ff;
            color: #1d4ed8;
        }

        .pdo-option-panel {
            margin-top: 12px;
            padding: 14px;
            border: 1px solid #dce5f0;
            border-radius: 9px;
            background: #fff;
            min-width: 0;
        }

        .pdo-option-panel[hidden] {
            display: none;
        }

        .pdo-option-panel input[type="file"] {
            width: 100%;
            min-width: 0;
        }

        .pdo-option-panel .field {
            margin-bottom: 0;
        }
        .pdo-follow-row {display:flex; align-items:center; gap:16px; justify-content:space-between;}
        .pdo-follow-row time {margin-left:auto; white-space:nowrap; color:#60728a;}
        .pdo-action-attachments {display:flex;gap:7px;flex-wrap:wrap;margin-top:6px;}
        .pdo-action-attachments button {font-size:11px;padding:5px 9px;}
                .pdo-welcome-add {
            display: flex;
            justify-content: flex-end;
            margin-top: 12px;
            margin-bottom: 0;
        }
        @media(max-width:600px){.pdo-follow-row{flex-wrap:wrap;}.pdo-follow-row time{margin-left:auto;}}
    

        #authGate {
            position: fixed;
            inset: 0;
            z-index: 200;
            display: flex;
            overflow-y: auto;
            padding: 28px 20px;
            background: #f4f5f6;
            color: #273445;
            font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
        }

        #authGate .auth-page {
            box-sizing: border-box;
            width: 100%;
            max-width: 420px;
            margin: auto;
            padding: 38px 34px 30px;
            background: #fff;
            border: 1px solid #e4e8ee;
            border-radius: 16px;
            box-shadow: 0 12px 40px rgba(13, 47, 99, 0.06);
        }

        #authGate .auth-brand {
            display: block;
            width: 250px;
            max-width: 100%;
            height: auto;
            margin: 0 auto 28px;
        }

        #authGate .auth-heading {
            margin-bottom: 28px;
            text-align: center;
        }

        #authGate .auth-heading h1 {
            margin: 0 0 8px;
            color: #0d2f63;
            font-size: 25px;
            font-weight: 600;
            line-height: 1.3;
        }

        #authGate .auth-heading p {
            margin: 0;
            color: #738093;
            font-size: 13px;
            line-height: 1.6;
        }

        #authGate .auth-form {
            width: 100%;
            margin: 0;
            padding: 0;
            border: 0;
            background: transparent;
            box-shadow: none;
        }

        #authGate .field {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 18px;
        }

        #authGate label {
            color: #43536a;
            font-size: 12px;
            font-weight: 600;
        }

        #authGate input {
            box-sizing: border-box;
            display: block;
            width: 100%;
            min-width: 0;
            height: 46px;
            padding: 10px 13px;
            border: 1px solid #dce3ec;
            border-radius: 8px;
            background: #fff;
            color: #273445;
            font: inherit;
            font-size: 14px;
        }

        #authGate input:focus {
            border-color: #1f6feb;
            outline: 3px solid #e9f1ff;
            outline-offset: 0;
        }

        #authGate .auth-password {
            position: relative;
        }

        #authGate .auth-password input {
            padding-right: 48px;
        }

        #authGate #authPass::-ms-reveal,
        #authGate #authPass::-ms-clear {
            display: none;
        }

        #authGate .auth-password-toggle {
            position: absolute;
            top: 50%;
            right: 10px;
            transform: translateY(-50%);
            padding: 5px;
            border: 0;
            background: transparent;
            color: #526072;
            font: inherit;
            font-size: 12px;
            cursor: pointer;
        }

        #authGate #authBtn {
            display: block;
            width: 100%;
            min-height: 46px;
            margin-top: 24px;
            padding: 11px 16px;
            border: 1px solid #1f6feb;
            border-radius: 8px;
            background: #1f6feb;
            color: #fff;
            font: inherit;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
        }

        #authGate #authBtn:hover {
            background: #164b93;
            border-color: #164b93;
        }

        #authGate button:focus-visible {
            outline: 3px solid #b9d5fc;
            outline-offset: 3px;
        }

        #authGate #authBtn:disabled {
            opacity: 0.65;
            cursor: wait;
        }

        #authGate .msg {
            margin-top: 14px;
            color: #a93434;
            font-size: 12px;
            line-height: 1.6;
            overflow-wrap: anywhere;
        }

        #authGate .msg:empty {
            display: none;
        }

        #authGate .msg.ok {
            color: #24774e;
        }

        @media (max-width: 480px) {
            #authGate .auth-page {
                padding: 30px 24px 26px;
            }

            #authGate .auth-brand {
                width: 230px;
            }
        }
    .cloud-app .shell {
    visibility: hidden;
}
#authGate .auth-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 26px 0 8px;
    color: #738093;
    font-size: 13px;
    text-align: center;
}

#authGate .auth-loader[hidden] {
    display: none;
}

#authGate .auth-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #e7edf6;
    border-top-color: #1f6feb;
    border-radius: 50%;
    animation: pdoAuthSpin 0.8s linear infinite;
}

@keyframes pdoAuthSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    #authGate .auth-spinner {
        animation-duration: 1.8s;
    }
}
#pdoBusy[hidden],
.pdo-operation-status[hidden] {
    display: none;
}

#pdoBusy {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(1px);
    cursor: progress;
}

.pdo-busy-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #234c87;
    font: 13px 'Segoe UI', Tahoma, Arial, sans-serif;
}

.pdo-busy-spinner {
    display: inline-block;
    box-sizing: border-box;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border: 5px solid #dce6f2;
    border-top-color: #234c87;
    border-right-color: #234c87;
    border-radius: 50%;
    animation: pdoBusySpin .85s linear infinite;
}

.pdo-inline-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    color: #647891;
}

.pdo-inline-loading .pdo-busy-spinner {
    width: 25px;
    height: 25px;
    border-width: 3px;
}

.pdo-table-host {
    position: relative;
    min-height: 140px;
}

.pdo-table-loading {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .7);
    cursor: progress;
}

.pdo-table-loading .pdo-inline-loading {
    min-height: 0;
}

.pdo-action-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}

.pdo-action-loading .pdo-busy-spinner,
.pdo-operation-status .pdo-busy-spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.primary.pdo-action-loading .pdo-busy-spinner {
    border-color: #ffffff55;
    border-top-color: #fff;
    border-right-color: #fff;
}

.pdo-operation-status {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 11000;
    display: grid;
    gap: 9px;
    padding: 12px 15px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 16px #17365c18;
    color: #234c87;
    font: 13px 'Segoe UI', Tahoma, Arial, sans-serif;
}

.pdo-operation-status > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes pdoBusySpin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pdo-busy-spinner {
        animation: none;
    }
}
.pdo-history-file {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
    font-size: 12px;
    color: #64748b;
}

.pdo-history-file .link {
    padding: 0;
    font-size: 12px;
}
textarea {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 13px !important;
    line-height: 1.5;
}
/* Granular admin access editor */
.access-panel{margin:18px 0;padding:16px;border:1px solid #dbe5f0;border-radius:12px;background:#f7faff}
.access-panel[hidden]{display:none}
.access-panel h3{margin-top:0}
.access-tasks{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.access-owner{display:flex;align-items:center;gap:8px;margin-top:16px;font-weight:600}

.access-team{margin:16px 0;padding-top:12px;border-top:1px solid #dbe5f0}
.access-team[hidden]{display:none}
.access-team-list{max-height:230px;overflow:auto;margin-top:10px;padding:4px;display:grid;gap:6px}
.access-team-list label{display:flex;align-items:center;gap:10px;padding:8px;border-radius:7px;background:white}
.access-team-list label[hidden]{display:none}
.access-team-list small{display:block;font-size:11px;color:#74849a;margin-top:3px}

/* Password recovery uses the existing sign-in card. */
#authGate [hidden]{display:none!important}
#authGate .auth-text-button{display:block;width:100%;margin:14px 0 0;padding:5px 0;border:0;background:transparent;color:#1856a0;text-align:center;font-size:13px;font-weight:600;text-decoration:none;box-sizing:border-box;cursor:pointer}
#authGate .auth-text-button:hover{text-decoration:underline}
#authGate .auth-text-button:disabled{opacity:.55;cursor:wait}
#authGate .auth-password-hint{color:#738093;font-size:12px}
#authGate .auth-reset-save{width:100%;padding:12px 15px;font-size:14px}
#authGate .auth-return:focus-visible{outline:2px solid #2879df;outline-offset:3px}
