/* Compliance Officer portal — design-only styles */

:root,
.co-page {
    --co-navy: #262646;
    --co-navy-2: #1b1f36;
    --co-teal: #3fd6d4;
    --co-teal-deep: #2ab7ca;
    --co-major: #c45c26;
    --co-minor: #c9922a;
    --co-ok: #1f7a43;
    --co-muted: #8aa0af;
    --co-text: #1a1f36;
    --co-border: #e6ecf2;
    --co-bg: #f4f6f8;
    --co-serif: "Roboto Slab", "Georgia", serif;
    --co-sans: Inter, "Segoe UI", system-ui, sans-serif;
}

.co-page {
    font-family: var(--co-sans);
    color: var(--co-text);
}

/* material-dashboard sets h1–h6 to Roboto Slab — keep compliance UI on Inter */
.co-page h1,
.co-page h2,
.co-page h3,
.co-page h4,
.co-page h5,
.co-page h6,
.co-page .h1,
.co-page .h2,
.co-page .h3,
.co-page .h4,
.co-page .h5,
.co-page .h6,
.co-list-wrap h1,
.co-list-wrap h2,
.co-list-wrap h3,
.co-list-wrap h4,
.co-list-wrap h5,
.co-list-wrap h6,
.co-review-app h1,
.co-review-app h2,
.co-review-app h3,
.co-review-app h4,
.co-review-app h5,
.co-review-app h6,
.co-modal h1,
.co-modal h2,
.co-modal h3,
.co-modal h4,
.co-modal h5,
.co-modal h6 {
    font-family: var(--co-sans) !important;
    letter-spacing: normal;
}

.co-page *,
.co-page *::before,
.co-page *::after {
    box-sizing: border-box;
}

/* ——— CO portal header ——— */
.co-chrome-header {
    background: #262646;
    background: var(--co-navy, #262646);
    color: #fff;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.co-chrome-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.co-chrome-brand img {
    height: 32px;
}

.co-chrome-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.co-chrome-nav a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
}

.co-chrome-nav a.active,
.co-chrome-nav a:hover {
    color: #fff;
}

/* MainLayout body when CO chrome is shown above (finish → audit report, etc.) */
.co-main-under-chrome {
    padding-top: 0;
}

.co-main-under-chrome .co-review-app {
    margin-top: 0;
}

.co-chrome-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.co-chrome-header-unified {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    min-height: 72px;
    padding: 0 28px;
}

.co-chrome-center {
    display: flex;
    justify-content: center;
    min-width: 0;
}

/* ——— CO Audits: main tabs in unified header ——— */
.co-main-tabs {
    background: var(--co-navy);
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
    padding: 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.co-main-tabs-inline {
    background: transparent;
    border-top: none;
    padding: 0;
    justify-content: center;
}

.co-main-tab {
    appearance: none;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-family: var(--co-sans);
    font-size: 15px;
    font-weight: 600;
    padding: 14px 4px 12px;
    margin-right: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-bottom: 3px solid transparent;
}

.co-main-tab:hover {
    color: #fff;
}

.co-main-tab.active {
    color: #fff;
    border-bottom-color: var(--co-teal);
}

.co-main-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 700;
}

.co-main-tab.active .co-main-tab-count {
    background: var(--co-teal);
    color: var(--co-navy);
}

/* ——— Ready for Audit sub-tabs ——— */
.co-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 20px;
}

.co-subtab {
    appearance: none;
    background: #fff;
    border: 1px solid var(--co-border);
    border-radius: 12px;
    padding: 14px 18px;
    font-family: var(--co-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--co-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(26, 31, 54, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.co-subtab:hover {
    border-color: #c5d0db;
}

.co-subtab.active {
    border-color: var(--co-teal);
    box-shadow: 0 0 0 1px var(--co-teal);
}

.co-subtab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #eef2f6;
    color: #5b6b7c;
    font-size: 12px;
    font-weight: 700;
}

.co-subtab.active .co-subtab-count {
    background: var(--co-teal);
    color: var(--co-navy);
}

.co-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--co-teal);
    color: var(--co-navy);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.co-avatar.sm {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

.co-avatar.navy {
    background: var(--co-teal);
    color: var(--co-navy);
}

/* ——— List pages ——— */
.co-list-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.co-list-title {
    font-family: var(--co-sans) !important;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--co-text);
    letter-spacing: -0.02em;
}

.co-list-sub {
    margin: 0 0 20px;
    color: var(--co-muted);
    font-size: 15px;
    line-height: 1.5;
    max-width: 720px;
}

.co-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.co-tab {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    background: #eef2f6;
    color: #5b6b7c;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.co-tab.active {
    background: var(--co-navy);
    color: #fff;
}

.co-tab-count {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--co-teal);
    color: var(--co-navy);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.co-tab:not(.active) .co-tab-count {
    background: #d7dee6;
    color: #4b5b6b;
}

.co-card {
    background: #fff;
    border: 1px solid var(--co-border);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.co-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.co-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7fafc;
    border: 1px solid var(--co-border);
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 220px;
    color: var(--co-muted);
}

.co-search input,
.co-filter {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: var(--co-text);
    width: 100%;
}

.co-filter {
    background: #f7fafc;
    border: 1px solid var(--co-border);
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 140px;
}

.co-toolbar-left {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.co-count {
    font-size: 12px;
    color: var(--co-muted);
    font-weight: 600;
}

.co-table {
    width: 100%;
    border-collapse: collapse;
}

.co-table th {
    text-align: left;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #8b9aab;
    font-weight: 700;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.co-table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid #f8fafc;
    vertical-align: middle;
}

.co-table tr:last-child td {
    border-bottom: none;
}

.co-loading {
    text-align: center;
    color: var(--co-muted);
    padding: 36px 16px;
    font-size: 13px;
    font-weight: 500;
}

.co-loading i {
    margin-right: 8px;
    color: var(--co-teal-deep);
}

.co-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.co-pager-info {
    font-size: 12px;
    color: var(--co-muted);
    font-weight: 600;
}

.co-pager-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}

.co-pager-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.co-page-ellipsis {
    min-width: 28px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.co-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--co-border);
    border-radius: 8px;
    background: #fff;
    color: var(--co-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.co-page-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.co-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.co-page-btn.active {
    background: var(--co-navy);
    border-color: var(--co-navy);
    color: #fff;
}

.co-per-page {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--co-muted);
    font-weight: 600;
    margin: 0;
}

.co-per-page-select {
    border: 1px solid var(--co-border);
    border-radius: 8px;
    background: #fff;
    color: var(--co-text);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 8px;
    font-family: inherit;
}

.co-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.co-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.co-pill.mortgage { background: #e6f7f6; color: #0f766e; }
.co-pill.kiwisaver { background: #efe7fb; color: #6d28d9; }
.co-pill.insurance { background: #fff1e6; color: #c2410c; }
.co-pill.critical, .co-pill.major { background: #fde8e4; color: #b42318; }
.co-pill.minor { background: #fef4d8; color: #a16207; }
.co-pill.ok, .co-pill.nofixes { background: #e8f8ef; color: #1f7a43; }
.co-pill.pending { background: #e8f1fb; color: #1d4ed8; }
.co-pill.neutral { background: #eef3f6; color: #6f8798; }
.co-pill.resolved { background: #e8f8ef; color: #1f7a43; }

.co-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}

.co-btn-outline {
    background: #fff;
    border-color: #d1d5db;
    color: #111827;
}

.co-btn-outline:hover { background: #f9fafb; color: #111827; }

.co-btn-muted {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #e5e7eb;
}

.co-btn-navy {
    background: var(--co-navy);
    color: #fff;
}

.co-btn-navy:hover { color: #fff; background: #1b1f36; }

.co-btn-navy:disabled,
.co-btn-navy.is-disabled {
    background: #c5ccd4;
    color: #fff;
    cursor: not-allowed;
}

.co-note-box {
    margin: 16px 18px 18px;
    padding: 12px 14px;
    border: 1px dashed #d5dee6;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

/* ——— Audit mode shell ——— */
.co-audit-shell {
    min-height: 100vh;
    background: var(--co-bg);
    display: flex;
    flex-direction: column;
}

.co-audit-bar {
    background: #262646;
    background: var(--co-navy, #262646);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.co-audit-bar-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.co-audit-bar-copy h1 {
    margin: 0;
    font-family: var(--co-sans);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: normal;
}

.co-audit-bar-copy p {
    margin: 2px 0 0;
    font-size: 12px;
    font-family: var(--co-sans);
    color: #9fb0c0;
}

.co-audit-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.co-tool-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.co-tool-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }

.co-auditor-pill {
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    color: #e2e8f0;
}

.co-progress-pill {
    font-size: 12px;
    color: #cbd5e1;
    white-space: nowrap;
}

.co-section-tabs {
    background: #fff;
    border-bottom: 1px solid var(--co-border);
    display: flex;
    gap: 4px;
    padding: 0 16px;
    overflow-x: auto;
}

.co-section-tab {
    border: none;
    background: transparent;
    padding: 14px 16px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    position: relative;
    white-space: nowrap;
    cursor: pointer;
}

.co-section-tab.active {
    color: #262646;
    font-weight: 700;
}

.co-section-tab.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 3px;
    background: #3fd6d4;
    border-radius: 3px 3px 0 0;
}

/* Status icons unused in audit tabs — keep class harmless if referenced */
.co-dot {
    display: none !important;
}

.co-soa-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 16px;
    background: #fff;
    border-bottom: 1px solid var(--co-border);
}

.co-soa-subtab {
    border: none;
    background: transparent;
    border-radius: 0;
    padding: 14px 16px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    box-shadow: none;
}

.co-soa-subtab.active {
    background: transparent;
    border: none;
    color: #262646;
    font-weight: 700;
    box-shadow: none;
}

.co-soa-subtab.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 3px;
    background: #3fd6d4;
    border-radius: 3px 3px 0 0;
}

.co-audit-body {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
    gap: 0;
    flex: 1;
    min-height: 0;
}

.co-live {
    padding: 20px 22px 28px;
    overflow: auto;
}

.co-live-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--co-teal-deep);
    margin: 0 0 4px;
}

.co-live-kicker.edit {
    color: #2ab7ca;
}

.co-live-sub {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 0 0 16px;
}

.co-live-card {
    background: #fff;
    border: 1px solid var(--co-border);
    border-radius: 14px;
    overflow: hidden;
}

.co-live-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.co-live-row:last-child { border-bottom: none; }

.co-live-row .label { color: #64748b; font-weight: 500; }
.co-live-row .value { color: var(--co-text); font-weight: 600; text-align: right; }
.co-live-row .value.warn { color: #c45c26; }
.co-live-row .value.danger { color: #b42318; }

.co-alert {
    background: #fff6e8;
    border: 1px solid #f3d7a8;
    color: #9a5b12;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}

.co-progress-thin {
    height: 6px;
    background: #f1e4d6;
    border-radius: 99px;
    overflow: hidden;
    margin: 0 16px 8px;
}

.co-progress-thin span {
    display: block;
    height: 100%;
    width: 8%;
    background: #e67e22;
}

.co-live-foot {
    padding: 10px 16px 14px;
    font-size: 13px;
    color: #c45c26;
    font-weight: 600;
}

/* ——— Right audit panel ——— */
.co-panel {
    background: #fff;
    border-left: 1px solid var(--co-border);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.co-panel-head {
    padding: 16px 18px 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--co-text);
}

.co-panel-scroll {
    overflow: auto;
    padding: 0 14px 16px;
    flex: 1;
}

.co-check {
    background: #fff;
    border: 1px solid var(--co-border);
    border-radius: 12px;
    padding: 14px 14px 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    border-left: 4px solid #e5e7eb;
}

.co-check.major { border-left-color: #c45c26; }
.co-check.minor { border-left-color: #e67e22; }
.co-check.compliant { border-left-color: #2d8a4e; }
.co-check.na { border-left-color: #cbd5e1; }

.co-check-id {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 6px;
}

.co-check-req {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 8px;
}

.co-flag {
    display: flex;
    gap: 8px;
    font-size: 12px;
    font-style: italic;
    color: #64748b;
    margin-bottom: 10px;
    line-height: 1.4;
}

.co-flag i { color: #94a3b8; font-style: normal; margin-top: 2px; }

.co-rates {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.co-rate {
    border: 1px solid #dbe3ea;
    background: #fff;
    border-radius: 8px;
    padding: 7px 4px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
}

.co-rate.compliant.is-on { border-color: #2d8a4e; color: #2d8a4e; background: #f1faf4; }
.co-rate.minor.is-on { border-color: #e67e22; color: #c45c26; background: #fff6ee; }
.co-rate.major.is-on { border-color: #c45c26; color: #c45c26; background: #fff1ea; }
.co-rate.na.is-on { border-color: #94a3b8; color: #64748b; background: #f8fafc; }

.co-check textarea,
.co-section-comment textarea,
.co-resolve-note {
    width: 100%;
    margin-top: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    min-height: 64px;
    resize: vertical;
    font-family: inherit;
}

.co-section-comment {
    padding: 8px 4px 16px;
}

.co-section-comment label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
}

.co-help {
    font-size: 11px;
    color: #94a3b8;
    margin: 6px 0 0;
}

.co-audit-footer {
    background: #fff;
    border-top: 1px solid var(--co-border);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.co-audit-footer .left {
    font-size: 13px;
    color: #64748b;
}

/* ——— Adviser report (inside standard MainLayout / Header) ——— */
.co-review-app {
    margin: 0 -12px;
    background: #fff;
    min-height: calc(100vh - 120px);
    font-family: var(--co-sans);
    color: var(--co-text);
}

.co-review-top .co-audit-bar {
    border-radius: 0;
    padding: 16px 24px;
}

.co-review-backbar {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.co-review-backbar .co-back-link {
    font-size: 14px;
    font-weight: 600;
    color: #262646;
    text-decoration: none;
}

.co-review-backbar .co-back-link:hover {
    color: #3fd6d4;
    text-decoration: underline;
}

.co-review-body {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px 40px;
    background: #fff;
}

/* Legacy standalone layout (kept for any remaining EmptyLayout previews) */
.co-review-page {
    background: var(--co-bg);
    min-height: 100vh;
    padding: 28px 16px 48px;
}

.co-review-kicker {
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 6px;
}

.co-review-title {
    text-align: center;
    font-family: var(--co-sans);
    font-size: 1.85rem;
    font-weight: 700;
    margin: 0 0 18px;
}

.co-review-card {
    max-width: 920px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.co-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid #f1f5f9;
}

.co-stat {
    padding: 16px 8px;
    text-align: center;
}

.co-stat strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
}

.co-stat span {
    font-size: 11px;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.co-stat.major strong, .co-stat.major span { color: #c45c26; }
.co-stat.minor strong, .co-stat.minor span { color: #c9922a; }
.co-stat.ok strong, .co-stat.ok span { color: #1f7a43; }
.co-stat.na strong, .co-stat.na span { color: #94a3b8; }

.co-acc {
    margin: 10px 14px;
    border-radius: 10px;
    overflow: hidden;
}

.co-acc-head {
    width: 100%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.co-acc.major .co-acc-head { background: #fdecea; color: #9f2a1a; }
.co-acc.minor .co-acc-head { background: #fbf3e0; color: #9a6b12; }
.co-acc.ok .co-acc-head { background: #eaf7ef; color: #1f7a43; }
.co-acc.na .co-acc-head { background: #f1f5f9; color: #64748b; }

.co-finding {
    border: 1px solid var(--co-border);
    border-left: 4px solid #c45c26;
    border-radius: 10px;
    padding: 14px;
    margin: 10px 0;
    background: #fff;
}

.co-finding.minor { border-left-color: #e67e22; }
.co-finding.ok { border-left-color: #2d8a4e; }
.co-finding.na { border-left-color: #cbd5e1; }

.co-finding-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.co-auditor-note {
    margin-top: 10px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #475569;
}

.co-review-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px 18px;
    flex-wrap: wrap;
}

.co-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin: 10px 0 14px;
}

.co-comment-card {
    border: 1px solid var(--co-border);
    border-left: 4px solid #c45c26;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    background: #fff;
}

.co-comment-card.minor { border-left-color: #e67e22; }

.co-comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.co-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.co-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    padding: 22px 22px 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    font-family: var(--co-sans);
    color: var(--co-text);
}

.co-modal h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--co-text);
    font-family: var(--co-sans) !important;
}

.co-modal p {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    font-family: var(--co-sans);
}

@media (max-width: 991px) {
    .co-audit-body {
        grid-template-columns: 1fr;
    }

    .co-panel {
        border-left: none;
        border-top: 1px solid var(--co-border);
        min-height: 420px;
    }

    .co-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ——— Audit Mode docked on live adviser screens ——— */
:root {
    --co-dock-width: 400px;
    --co-audit-banner-height: 64px;
    --co-audit-tabs-height: 44px;
    --co-audit-chrome-height: calc(var(--co-audit-banner-height) + var(--co-audit-tabs-height));
}

.co-audit-mode-root {
    /* Heights come from :root / JS — do not redeclare or they shadow live sync */
}

body:has(.co-audit-mode-root) .main-content,
main.main-content:has(.co-audit-mode-root) {
    margin: 0 !important;
    border-radius: 0 !important;
    padding-top: 0 !important;
}

body:has(.co-audit-mode-root) {
    padding-top: 0 !important;
}

.co-audit-mode-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1045;
    background: #262646;
    color: #fff;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 16px;
    padding: 8px 16px;
    margin: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
    min-height: 56px;
}

.co-audit-mode-banner-left {
    display: flex;
    justify-content: flex-start;
    flex-shrink: 0;
}

.co-audit-mode-banner-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 0;
    text-align: center;
    font-family: var(--co-sans);
}

.co-audit-mode-banner-right {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.co-audit-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(63, 214, 212, 0.18);
    border: 1px solid rgba(63, 214, 212, 0.45);
    color: #3fd6d4;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.co-audit-mode-client {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.co-audit-mode-meta {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
    max-width: 720px;
}

.co-audit-mode-banner .co-btn {
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    padding: 6px 12px;
    min-height: 32px;
}

.co-audit-mode-banner .co-btn-outline {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    color: #fff !important;
}

.co-audit-mode-banner .co-btn-outline:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.85) !important;
    color: #fff !important;
}

.co-audit-checks-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: transparent;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.2;
}

.co-btn-teal.co-audit-finish {
    background: linear-gradient(90deg, #3fd6d4 0%, #6fe8e6 100%) !important;
    border: none !important;
    color: #111827 !important;
    font-weight: 700;
    white-space: nowrap;
    padding: 6px 12px;
}

.co-btn-teal.co-audit-finish:hover {
    background: linear-gradient(90deg, #35c4c2 0%, #5ad9d7 100%) !important;
    color: #111827 !important;
}

.co-audit-dock .co-flag {
    background: rgba(61, 47, 36, 0.85);
    border: 1px solid #5c4332;
    border-radius: 8px;
    padding: 10px 12px;
    color: #f0d4b8;
    font-style: normal;
}

.co-audit-dock .co-flag i {
    color: #e8a86a;
}

.co-audit-mode-banner-slot {
    height: var(--co-audit-banner-height, 64px);
    min-height: 0;
    margin: 0;
    padding: 0;
    line-height: 0;
    pointer-events: none;
}

main.main-content:has(.co-audit-mode-root) .container-fluid {
    padding: 0 16px !important;
    max-width: none;
    margin-top: 0 !important;
}

main.main-content:has(.co-audit-mode-root) .row.mt-3,
main.main-content:has(.co-audit-mode-root) .row.mx-2 {
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
}

/* Hide duplicate Applications title during audit — tabs are the nav */
main.main-content:has(.co-audit-mode-root) .bm-apps-page-header,
main.main-content:has(.co-audit-mode-root) .bm-apps-page-title,
main.main-content:has(.co-audit-mode-root) .bm-apps-page-rule,
main.main-content:has(.co-audit-mode-root) hr.horizontal-line.bm-apps-page-rule,
main.main-content:has(.co-audit-mode-root) .row.mt-3.mx-2 > h5:first-of-type,
main.main-content:has(.co-audit-mode-root) .row.mt-3.mx-2 > hr.horizontal-line {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* Tabs sit flush under the fixed audit banner */
main.main-content:has(.co-audit-mode-root) .tabbable-line {
    position: sticky;
    top: var(--co-audit-banner-height, 64px);
    z-index: 1044;
    background: #fff;
    margin: 0 -16px 8px;
    padding: 0 16px;
    min-height: var(--co-audit-tabs-height, 44px);
    border-bottom: 1px solid #e6ecf2;
    box-shadow: none;
}

main.main-content:has(.co-audit-mode-root) .tabbable-line > .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    border-bottom: none;
    margin-bottom: 0;
    gap: 8px;
    padding: 0;
    scrollbar-width: none;
}

main.main-content:has(.co-audit-mode-root) .tabbable-line > .nav-tabs::-webkit-scrollbar {
    display: none;
}

main.main-content:has(.co-audit-mode-root) .tabbable-line > .nav-tabs > li {
    margin: 0;
    border: none;
    float: none;
    position: relative;
}

main.main-content:has(.co-audit-mode-root) .tabbable-line > .nav-tabs > li > a {
    border: none !important;
    background: transparent !important;
    padding: 14px 16px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8 !important;
    position: relative;
    white-space: nowrap;
    margin: 0;
    box-shadow: none !important;
}

main.main-content:has(.co-audit-mode-root) .tabbable-line > .nav-tabs > li.active > a,
main.main-content:has(.co-audit-mode-root) .tabbable-line > .nav-tabs > li.active > a:hover,
main.main-content:has(.co-audit-mode-root) .tabbable-line > .nav-tabs > li.active > a:focus {
    border: none !important;
    color: #262646 !important;
    font-weight: 700 !important;
    background: transparent !important;
}

main.main-content:has(.co-audit-mode-root) .tabbable-line > .nav-tabs > li.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 3px;
    background: #3fd6d4;
    border-radius: 3px 3px 0 0;
}

main.main-content:has(.co-audit-mode-root) .tabbable-line > .nav-tabs > li.active {
    border-bottom: none;
}

/* No status icons / checkmarks / dots on audit section tabs */
main.main-content:has(.co-audit-mode-root) .tabbable-line .co-dot,
main.main-content:has(.co-audit-mode-root) .tabbable-line .fa-check,
main.main-content:has(.co-audit-mode-root) .tabbable-line .fa-circle,
main.main-content:has(.co-audit-mode-root) .tabbable-line [class*="status-icon"] {
    display: none !important;
}

main.main-content:has(.co-audit-mode-root) .scope-tracker-header {
    position: sticky;
    top: var(--co-audit-chrome-height);
    z-index: 1038;
}

.co-audit-mode-banner-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-family: var(--co-sans);
}

.co-audit-mode-banner-main strong {
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #3fd6d4;
}

.co-audit-mode-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.co-audit-dock {
    position: fixed;
    top: calc(var(--co-audit-chrome-height) + 8px);
    right: 16px;
    bottom: 16px;
    width: var(--co-dock-width);
    z-index: 1035;
    background: #1a1f36;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.co-audit-mode-root:not(.is-collapsed) ~ *,
body:has(.co-audit-mode-root:not(.is-collapsed)) .container-fluid {
    padding-right: calc(var(--co-dock-width) + 32px) !important;
}

main.main-content:has(.co-audit-mode-root:not(.is-collapsed)) .container-fluid {
    padding-right: calc(400px + 32px) !important;
}

/* Hide client Dashboard/Analysis sidebar during CO audit mode */
main.main-content:has(.co-audit-mode-root) .row > [class*="col-md-2"]:first-child,
main.main-content:has(.co-audit-mode-root) .row > [class*="col-4"]:first-child {
    display: none !important;
}

main.main-content:has(.co-audit-mode-root) .row > [class*="col-md-10"],
main.main-content:has(.co-audit-mode-root) .row > [class*="col-8"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

.co-audit-dock .co-audit-dock-head {
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.co-audit-dock-kicker {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3fd6d4;
    margin-bottom: 4px;
}

.co-audit-dock-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.co-audit-dock .co-panel-scroll {
    flex: 1;
    overflow: auto;
    padding: 12px 14px;
}

.co-audit-dock .co-check {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: none;
}

.co-audit-dock .co-check.compliant {
    border-color: rgba(63, 214, 212, 0.45);
    box-shadow: 0 0 0 1px rgba(63, 214, 212, 0.25);
}

.co-audit-dock .co-check.major {
    border-color: rgba(196, 92, 38, 0.55);
    box-shadow: 0 0 0 1px rgba(196, 92, 38, 0.2);
}

.co-audit-dock .co-check.minor {
    border-color: rgba(230, 126, 34, 0.55);
    box-shadow: 0 0 0 1px rgba(230, 126, 34, 0.2);
}

.co-audit-dock .co-check-id {
    color: #7c8db5;
}

.co-audit-dock .co-check-req {
    color: #f1f5f9;
    font-weight: 600;
}

.co-audit-dock .co-rate {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
}

.co-audit-dock .co-rate.compliant.is-on {
    background: rgba(33, 61, 66, 0.9);
    border-color: #3eb386;
    color: #82e6b8;
    font-weight: 700;
}

.co-audit-dock .co-rate.minor.is-on {
    background: rgba(230, 126, 34, 0.2);
    border-color: #e67e22;
    color: #fbd38d;
}

.co-audit-dock .co-rate.major.is-on {
    background: rgba(196, 92, 38, 0.2);
    border-color: #c45c26;
    color: #fbb6a0;
}

.co-audit-dock .co-rate.na.is-on {
    background: rgba(148, 163, 184, 0.15);
    border-color: #94a3b8;
    color: #e2e8f0;
}

.co-audit-dock .co-check textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}

.co-audit-dock .co-section-comment label {
    color: #94a3b8;
    text-transform: uppercase;
}

.co-audit-dock .co-section-comment textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}

.co-audit-dock .co-help {
    color: #7c8db5;
}

.co-audit-dock-foot {
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #1a1f36;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.co-audit-dock-foot .co-audit-save {
    width: 100%;
    background: #3fd6d4 !important;
    border: none !important;
    color: #111827 !important;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 8px;
}

.co-audit-dock-foot .co-audit-save:hover {
    background: #35c4c2 !important;
    color: #111827 !important;
}

.co-audit-dock-foot .co-audit-dock-collapse {
    width: 100%;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    color: #fff !important;
    font-weight: 700;
    padding: 9px 14px;
    border-radius: 8px;
}

.co-audit-dock-foot .co-audit-dock-collapse:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.85) !important;
    color: #fff !important;
}

@media (max-width: 991px) {
    .co-audit-dock {
        position: fixed;
        left: 12px;
        right: 12px;
        width: auto;
        top: auto;
        bottom: 0;
        max-height: 45vh;
        border-radius: 12px 12px 0 0;
    }

    main.main-content:has(.co-audit-mode-root:not(.is-collapsed)) .container-fluid {
        padding-right: 12px !important;
        padding-bottom: 48vh !important;
    }
}

