:root {
    --bg: #f3f7fb;
    --text: #16324f;
    --muted: #5b7086;
    --card: #ffffff;
    --line: #d9e3ee;
    --nhs-accent: #005eb8;
    --success: #007f3b;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, Arial, sans-serif; background: var(--bg); color: var(--text); }
body { min-height: 100vh; }

a { color: var(--nhs-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell { display: grid; grid-template-columns: 320px 1fr; min-height: 100vh; }
.sidebar {
    background: linear-gradient(180deg, #08305a 0%, #0f4f8a 100%);
    color: white;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.brand h1 { margin: 4px 0 8px; font-size: 1.8rem; line-height: 1.1; }
.brand p, .brand-kicker, .sidebar-footer span { color: rgba(255,255,255,.85); }
.brand-kicker, .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; }
.nav { display: grid; gap: 8px; }
.nav a {
    color: white;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
}
.nav a:hover { background: rgba(255,255,255,.16); text-decoration: none; }

.content { padding: 36px; }
.hero, .page-header, .grid-4, .grid-3, .grid-2, .card, .table-card { margin-bottom: 24px; }
.hero {
    display: grid;
    grid-template-columns: 1.6fr .9fr;
    gap: 24px;
    align-items: stretch;
}
.hero h2, .page-header h2 { margin: 8px 0 8px; font-size: 2.2rem; }
.lead, .page-header p, .card p, .muted { color: var(--muted); line-height: 1.6; }

.hero-card, .card, .table-card, .sub-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 12px 35px rgba(8,48,90,.08);
}
.sub-card { padding: 18px; margin-top: 16px; box-shadow: none; }

.metric { padding: 12px 0; border-bottom: 1px solid var(--line); }
.metric:last-child { border-bottom: none; }
.metric span, .metric-card span { display: block; color: var(--muted); }
.metric strong, .metric-card strong { font-size: 2rem; margin-top: 6px; display: block; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.metric-card { text-align: left; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    background: var(--nhs-accent);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
}
.button:hover { text-decoration: none; filter: brightness(.98); }
.button.ghost { background: transparent; color: var(--nhs-accent); border: 1px solid var(--nhs-accent); }
.link-button {
    border: none;
    background: transparent;
    color: var(--nhs-accent);
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.hero-actions, .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud span, .pill {
    background: #e9f2fb;
    color: #0f4f8a;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .9rem;
}

.table-card table { width: 100%; border-collapse: collapse; }
.table-card th, .table-card td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.table-card th { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.form-grid .full { grid-column: 1 / -1; }

input, select, textarea {
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #c5d3e0;
    background: white;
    font: inherit;
}
label { font-weight: 700; }
.checkbox-row { display: inline-flex; align-items: center; gap: 10px; }
.checkbox-row input { width: auto; margin-top: 0; }

.section-card { display: grid; gap: 18px; }
.response-row {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(120px, .6fr)) 1.4fr;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.response-row:first-of-type { border-top: none; padding-top: 0; }
.response-title p { margin: 8px 0 0; color: var(--muted); }
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.summary-grid div { display: grid; gap: 6px; }
.settings-list, .stack, .feature-list { display: grid; gap: 14px; }
.setting-row {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 20px;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid var(--line);
}
.setting-row:first-child { border-top: none; }

.user-chip {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 12px;
}
.user-chip strong, .user-chip span { display: block; }

.sticky-actions {
    position: sticky;
    bottom: 20px;
    background: rgba(243,247,251,.85);
    backdrop-filter: blur(6px);
    padding: 12px 0 0;
}

.row-between { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.right-align { text-align: right; }
.compact-top { margin-top: 12px; }
.compact-row { padding: 10px 0; border-top: 1px solid var(--line); }
.compact-row:first-child { border-top: none; }
.status-card { padding: 16px 20px; border-left: 4px solid var(--success); }
.hierarchy-card h3 { margin-bottom: 4px; }
.template-item-grid, .user-edit-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.align-end { display: flex; align-items: end; }
.full-width-grid { grid-column: 1 / -1; }

@media (max-width: 1200px) {
    .response-row, .template-item-grid, .user-edit-grid { grid-template-columns: 1fr 1fr; }
    .summary-grid, .grid-4, .grid-3, .grid-2, .hero, .form-grid, .setting-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { padding: 24px; }
    .content { padding: 20px; }
    .row-between { flex-direction: column; }
}

.nav-submenu {
    display: grid;
    gap: 8px;
    margin: -2px 0 2px 14px;
    padding-left: 12px;
    border-left: 2px solid rgba(255,255,255,.18);
}
.nav-submenu a {
    background: rgba(255,255,255,.05);
    font-size: .95rem;
}
.validation-summary {
    padding: 14px 18px;
    border-radius: 16px;
    border-left: 4px solid #c81e1e;
    background: #fff4f4;
    color: #7f1d1d;
}
.validation-summary:empty {
    display: none;
}
.field-validation {
    display: block;
    margin-top: 8px;
    color: #b42318;
    font-size: .9rem;
}
.input-validation-error,
select.input-validation-error,
textarea.input-validation-error {
    border-color: #d92d20;
    background: #fff8f7;
}


.survey-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
}
.survey-editor-progress {
    min-width: 280px;
    display: grid;
    gap: 12px;
}
.progress-track {
    height: 10px;
    border-radius: 999px;
    background: #e2ebf5;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--nhs-accent) 0%, #3b82f6 100%);
}
.summary-grid-compact strong,
.summary-grid-compact span {
    display: block;
}
.survey-summary-card {
    padding: 18px 24px;
}
.survey-tab-shell {
    padding: 0;
    overflow: hidden;
}
.survey-tabs {
    display: flex;
    gap: 10px;
    padding: 18px 18px 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.survey-tab {
    min-width: 220px;
    padding: 14px 18px;
    border-radius: 18px 18px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    background: transparent;
    color: var(--muted);
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.survey-tab.active {
    background: white;
    color: var(--text);
    border-color: var(--line);
    box-shadow: 0 -8px 22px rgba(8,48,90,.05);
}
.survey-tab-step {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.survey-tab-title {
    display: block;
    font-weight: 700;
    white-space: normal;
}
.survey-section-panel {
    display: none;
    padding: 24px;
}
.survey-section-panel.active {
    display: block;
}
.section-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 18px;
}
.section-panel-header h3 {
    margin: 8px 0 6px;
    font-size: 1.7rem;
}
.section-panel-header p {
    margin: 0;
    color: var(--muted);
}
.section-item-count {
    white-space: nowrap;
}
.survey-question-stack {
    display: grid;
    gap: 18px;
}
.survey-question-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    padding: 20px;
}
.survey-question-heading {
    margin-bottom: 16px;
}
.survey-question-category {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf5ff;
    color: #0f4f8a;
    font-weight: 700;
    font-size: .86rem;
    margin-bottom: 10px;
}
.survey-question-heading h4 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.45;
}
.survey-question-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 16px;
}
.survey-question-comments {
    grid-column: 1 / -1;
}
.survey-question-grid input,
.survey-question-grid select,
.survey-question-grid textarea {
    min-height: 52px;
    font-size: 1rem;
}
.survey-question-grid textarea {
    min-height: 120px;
    resize: vertical;
}
.sticky-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    margin-top: 18px;
}
.sticky-action-meta {
    display: grid;
    gap: 4px;
}
.sticky-action-meta span {
    color: var(--muted);
}
.sticky-action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 1200px) {
    .survey-question-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .survey-editor-header,
    .section-panel-header,
    .sticky-action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .survey-editor-progress {
        min-width: 0;
    }
    .survey-section-panel {
        padding: 18px;
    }
    .survey-question-grid {
        grid-template-columns: 1fr;
    }
    .survey-tabs {
        padding: 14px 14px 0;
    }
    .survey-tab {
        min-width: 180px;
    }
    .sticky-action-buttons {
        width: 100%;
        justify-content: stretch;
    }
    .sticky-action-buttons .button {
        flex: 1 1 180px;
        min-height: 52px;
    }
}


/* Tablet-first survey editor enhancements */
.tablet-survey-form .button {
    min-height: 58px;
    padding: 14px 22px;
    font-size: 1rem;
}

.tablet-survey-form label {
    font-size: 1rem;
}

.tablet-survey-form input,
.tablet-survey-form select,
.tablet-survey-form textarea {
    min-height: 58px;
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: 16px;
}

.tablet-survey-form textarea {
    min-height: 132px;
}

.survey-tab {
    min-height: 86px;
    padding: 16px 20px;
}

.survey-question-card {
    padding: 24px;
}

.photo-upload-panel {
    margin-top: 10px;
    border: 1px dashed #9ab6d6;
    border-radius: 18px;
    padding: 16px;
    background: #f8fbff;
}

.photo-upload-input {
    min-height: 64px;
    padding: 14px;
    background: white;
}

.photo-gallery,
.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.photo-thumb-link {
    display: block;
    text-decoration: none;
}

.photo-thumb,
.photo-preview-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #eef4fa;
    box-shadow: 0 8px 22px rgba(8,48,90,.08);
}

.photo-preview-card {
    display: grid;
    gap: 8px;
}

.photo-preview-name {
    font-size: .85rem;
    color: var(--muted);
    word-break: break-word;
}

.survey-question-photos {
    grid-column: 1 / -1;
}

@media (max-width: 1180px) {
    .shell {
        grid-template-columns: 250px 1fr;
    }

    .content {
        padding: 24px;
    }

    .tablet-survey-form .button {
        min-height: 60px;
    }

    .survey-question-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .photo-gallery,
    .photo-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .survey-tab {
        min-width: 220px;
    }
}


.readonly-field {
    background: #f3f7fb;
    color: #345;
}

.survey-risk-score-panel {
    display: grid;
    gap: 10px;
}

.risk-score-value[readonly] {
    background: #f7f9fc;
    font-weight: 700;
}

.risk-band {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.risk-none {
    background: #f4f6f8;
    color: #5c6b78;
    border-color: #d8e0e8;
}

.risk-low {
    background: #e7f7eb;
    color: #1d6b2d;
    border-color: #b7dfc0;
}

.risk-moderate {
    background: #fff7d6;
    color: #7a5a00;
    border-color: #eed98a;
}

.risk-significant {
    background: #fde6f0;
    color: #9d2258;
    border-color: #f1b6d0;
}

.risk-high {
    background: #fde8e8;
    color: #a12626;
    border-color: #f0bbbb;
}


html, body {
    overflow-x: hidden;
}

.shell {
    grid-template-columns: 236px minmax(0, 1fr);
    overflow-x: hidden;
    transition: grid-template-columns .2s ease;
}

.content {
    min-width: 0;
    overflow-x: hidden;
}

.sidebar {
    min-width: 0;
    padding: 20px 16px 24px;
    transition: padding .2s ease;
}

.sidebar-topbar {
    display: flex;
    justify-content: flex-end;
}

.sidebar-toggle {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    color: white;
    cursor: pointer;
    font: inherit;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,.16);
}

.nav a,
.sidebar-signout,
.sidebar-signin {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-icon {
    width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex: 0 0 24px;
}

.nav-label {
    white-space: nowrap;
}

.sidebar-collapsed .shell {
    grid-template-columns: 92px minmax(0, 1fr);
}

.sidebar-collapsed .sidebar {
    padding-inline: 12px;
}

.sidebar-collapsed .brand h1,
.sidebar-collapsed .brand p,
.sidebar-collapsed .brand-kicker,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .user-chip span,
.sidebar-collapsed .user-chip strong,
.sidebar-collapsed .sidebar-footer .button .nav-label {
    display: none;
}

.sidebar-collapsed .brand {
    display: flex;
    justify-content: center;
}

.sidebar-collapsed .brand::after {
    content: "NHS";
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255,255,255,.1);
    font-weight: 800;
    letter-spacing: .08em;
}

.sidebar-collapsed .nav a,
.sidebar-collapsed .sidebar-signout,
.sidebar-collapsed .sidebar-signin {
    justify-content: center;
    padding-inline: 0;
}

.sidebar-collapsed .nav-submenu {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
}

.sidebar-collapsed .user-chip {
    padding: 10px;
    min-height: 56px;
}

.sidebar-collapsed .user-chip::before {
    content: "ðŸ‘¤";
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 1.2rem;
}

.survey-tab-shell,
.table-card,
.card,
.hero-card,
.sub-card {
    max-width: 100%;
}

.survey-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    overflow: visible;
    padding-right: 18px;
}

.survey-tab {
    min-width: 0;
    width: 100%;
    min-height: 88px;
}

.survey-question-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.survey-question-comments,
.survey-question-photos {
    grid-column: 1 / -1;
}

.sticky-action-buttons .button {
    min-height: 58px;
}

@media (max-width: 1100px) {
    .shell {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    body:not(.sidebar-expanded) .brand h1,
    body:not(.sidebar-expanded) .brand p,
    body:not(.sidebar-expanded) .brand-kicker,
    body:not(.sidebar-expanded) .nav-label,
    body:not(.sidebar-expanded) .user-chip span,
    body:not(.sidebar-expanded) .user-chip strong,
    body:not(.sidebar-expanded) .sidebar-footer .button .nav-label {
        display: none;
    }

    body:not(.sidebar-expanded) .nav a,
    body:not(.sidebar-expanded) .sidebar-signout,
    body:not(.sidebar-expanded) .sidebar-signin {
        justify-content: center;
        padding-inline: 0;
    }

    body:not(.sidebar-expanded) .nav-submenu {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
    }
}

@media (max-width: 900px) {
    .shell,
    .sidebar-collapsed .shell {
        grid-template-columns: 1fr;
    }

    .sidebar,
    .sidebar-collapsed .sidebar {
        padding: 18px 16px;
    }

    .sidebar-topbar {
        justify-content: space-between;
    }

    .brand h1,
    .brand p,
    .brand-kicker,
    .nav-label,
    .user-chip span,
    .user-chip strong,
    .sidebar-footer .button .nav-label {
        display: block;
    }

    .nav a,
    .sidebar-signout,
    .sidebar-signin {
        justify-content: flex-start;
        padding-inline: 14px;
    }

    .survey-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Patch 14: cleaner section tabs and simpler survey cards */
.survey-tab-shell {
    overflow: visible;
}

.survey-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    padding: 18px;
    overflow: visible;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.survey-tab {
    min-width: 0;
    min-height: 78px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #f9fbfd;
    box-shadow: none;
}

.survey-tab.active {
    background: #ffffff;
    border-color: #9fc1e4;
    box-shadow: 0 10px 24px rgba(8,48,90,.08);
}

.survey-tab-step {
    font-size: .72rem;
    margin-bottom: 6px;
}

.survey-tab-title {
    font-size: .98rem;
    line-height: 1.25;
}

.survey-question-context {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .95rem;
}

.survey-question-grid.survey-question-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.survey-risk-score-panel {
    grid-column: span 2;
}

.survey-question-comments,
.survey-question-photos {
    grid-column: 1 / -1;
}

.sticky-action-bar {
    position: sticky;
    bottom: 16px;
    z-index: 10;
}

@media (max-width: 1200px) {
    .survey-tabs {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .survey-question-grid.survey-question-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .survey-risk-score-panel {
        grid-column: span 1;
    }
}

@media (max-width: 700px) {
    .survey-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .survey-question-grid.survey-question-grid-compact {
        grid-template-columns: 1fr;
    }
}


/* Restored after accidental stylesheet overwrite */
.survey-tab.section-status-not-started {
    background: #fdeaea;
    border-color: #efb5b5;
}
.survey-tab.section-status-in-progress {
    background: #fff4cc;
    border-color: #e7cf70;
}
.survey-tab.section-status-complete {
    background: #e7f6ea;
    border-color: #9fd3ab;
}



/* Tablet survey editor */
.tablet-editor {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    padding: 1rem 0 2rem;
}

.tablet-editor__rail,
.tablet-editor__card,
.tablet-editor__actions,
.tablet-editor__main-header {
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(15, 47, 82, 0.05);
}

.tablet-editor__rail {
    padding: 1.5rem;
    position: sticky;
    top: 1rem;
}

.tablet-editor__rail-header h1,
.tablet-editor__main-header h2,
.tablet-editor__card-header h3,
.tablet-question-card h4 {
    margin: 0;
    color: #14365d;
}

.tablet-editor__rail-header h1 {
    font-size: 2.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.tablet-editor__location {
    font-size: 1.35rem;
    line-height: 1.4;
    color: #334f70;
}

.tablet-editor__location--main {
    margin-top: 0.75rem;
}

.tablet-editor__metrics {
    display: grid;
    gap: 1rem;
    margin-top: 1.75rem;
    margin-bottom: 1.75rem;
}

.tablet-metric__label {
    display: block;
    color: #627b99;
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
}

.tablet-metric strong {
    font-size: 2.2rem;
    color: #163b64;
}

.tablet-editor__sections {
    display: grid;
    gap: 0.9rem;
}

.tablet-section-card {
    display: block;
    text-decoration: none;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    border: 1px solid #e0e7f0;
    background: #f9fbfd;
    color: #173b63;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.tablet-section-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 47, 82, 0.08);
}

.tablet-section-card.active {
    box-shadow: inset 4px 0 0 #f2c94c, 0 12px 24px rgba(15, 47, 82, 0.08);
}

.tablet-section-card__eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .78rem;
    font-weight: 700;
    color: #677f99;
    margin-bottom: 0.35rem;
}

.tablet-section-card__title {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.tablet-section-card__status {
    font-size: 1.1rem;
    color: #45617f;
}

.tablet-editor__main {
    min-width: 0;
}

.tablet-editor__main-header {
    padding: 1.5rem 1.75rem;
    margin-bottom: 1rem;
}

.tablet-editor__main-header h2 {
    font-size: 3rem;
    margin-top: 0.35rem;
}

.tablet-editor__card {
    padding: 1.5rem;
}

.tablet-editor__card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.tablet-editor__card-header h3 {
    font-size: 2.45rem;
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
}

.tablet-editor__card-header p {
    margin: 0;
    color: #506983;
    font-size: 1.2rem;
}

.tablet-editor__item-pill {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: #eef4fb;
    color: #1e73d8;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
}

.tablet-editor__questions {
    display: grid;
    gap: 1.25rem;
}

.tablet-question-card {
    border: 1px solid #dbe4ef;
    border-radius: 22px;
    padding: 1.25rem;
    background: #fff;
}

.tablet-question-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.tablet-question-card__category {
    display: inline-block;
    margin-bottom: 0.55rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #eef4fb;
    color: #205ea7;
    font-size: .9rem;
    font-weight: 700;
}

.tablet-question-card h4 {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

.tablet-question-card p {
    margin: 0;
    color: #536e8a;
    font-size: 1.08rem;
}

.tablet-form-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: end;
}

.tablet-form-grid--full {
    grid-template-columns: 1fr;
}

.tablet-form-grid--risk {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tablet-form-grid--rating {
    grid-template-columns: minmax(0, 1fr) auto;
}

.tablet-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 1.08rem;
    font-weight: 700;
    color: #173b63;
}

.tablet-editor .form-control {
    min-height: 58px;
    border-radius: 16px;
    border: 1px solid #cbd7e5;
    font-size: 1.18rem;
    padding: 0.8rem 1rem;
    box-shadow: none;
}

.tablet-editor textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

.tablet-risk-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.05rem;
}

.tablet-risk-pill--inline {
    align-self: end;
}

.tablet-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.tablet-photo-thumb {
    width: 150px;
    height: 110px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #dbe4ef;
    background: #f3f6fa;
}

.tablet-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tablet-photo-add {
    width: 150px;
    height: 110px;
    border-radius: 18px;
    border: 1px dashed #c4d1df;
    background: #f8fafc;
    color: #33516f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
}

.tablet-photo-input {
    display: none;
}

.tablet-editor__actions {
    position: sticky;
    bottom: 1rem;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.tablet-editor__actions-left,
.tablet-editor__actions-right {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.tablet-editor__actions .btn {
    min-height: 58px;
    padding: 0.85rem 1.4rem;
    border-radius: 16px;
    font-size: 1.15rem;
    font-weight: 700;
}

.tablet-editor .section-status-not-started {
    background: #fdf0f0;
    border-color: #edc0c0;
}

.tablet-editor .section-status-in-progress {
    background: #fff6cf;
    border-color: #edd778;
}

.tablet-editor .section-status-complete {
    background: #eaf7ee;
    border-color: #a8d5b5;
}

.tablet-editor .risk-low {
    background: #dff3e6;
    color: #167a3d;
}

.tablet-editor .risk-moderate {
    background: #fff3c7;
    color: #8b6b00;
}

.tablet-editor .risk-significant {
    background: #ffdfe9;
    color: #a33562;
}

.tablet-editor .risk-high {
    background: #ffd7d7;
    color: #b42318;
}

.tablet-editor .risk-none {
    background: #edf2f7;
    color: #5b7088;
}

@media (max-width: 1200px) {
    .tablet-editor {
        grid-template-columns: 1fr;
    }

    .tablet-editor__rail {
        position: static;
    }

    .tablet-editor__sections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .tablet-editor__sections {
        grid-template-columns: 1fr;
    }

    .tablet-form-grid--risk,
    .tablet-form-grid--rating {
        grid-template-columns: 1fr;
    }

    .tablet-editor__actions {
        position: static;
        flex-direction: column;
    }

    .tablet-editor__actions-left,
    .tablet-editor__actions-right {
        width: 100%;
    }

    .tablet-editor__actions .btn {
        flex: 1 1 auto;
    }
}




/* Option A full-screen tablet survey editor */
.editor-shell-a {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.15rem;
    align-items: start;
    min-height: calc(100vh - 72px);
}

.editor-shell-a__rail,
.editor-shell-a__hero,
.editor-shell-a__panel,
.editor-shell-a__actions {
    background: rgba(255,255,255,0.96);
    border: 1px solid #dbe4ef;
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(11, 42, 78, .08);
}

.editor-shell-a__rail {
    padding: 1rem;
    position: sticky;
    top: 1rem;
}

.editor-shell-a__rail-top h1 {
    margin: .4rem 0 .55rem;
    font-size: 2.15rem;
    color: #163660;
}

.editor-shell-a__site,
.editor-shell-a__hero-site,
.editor-shell-a__panel-site {
    color: #4e6784;
    font-size: 1.1rem;
    line-height: 1.45;
}

.editor-shell-a__metrics {
    display: grid;
    gap: .55rem;
    margin: 1.15rem 0 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #173e6a 0%, #1f548e 100%);
    color: white;
}

.editor-shell-a__metric {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: .2rem 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.editor-shell-a__metric:last-child { border-bottom: none; }
.editor-shell-a__metric span {
    font-size: .95rem;
    color: rgba(255,255,255,.9);
}
.editor-shell-a__metric strong {
    font-size: 1.95rem;
    font-weight: 800;
    color: white;
}

.editor-shell-a__sections {
    display: grid;
    gap: .7rem;
}

.editor-shell-a__section-card {
    display: block;
    text-decoration: none;
    padding: .8rem .95rem;
    border-radius: 18px;
    border: 1px solid #e0c0c0;
    background: #fff1f3;
    color: #173b63;
    min-height: 96px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.editor-shell-a__section-card:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(11,42,78,.08);
}
.editor-shell-a__section-card.active {
    box-shadow: inset 4px 0 0 #f4c83d, 0 10px 24px rgba(11,42,78,.08);
}
.editor-shell-a__section-kicker {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .72rem;
    font-weight: 800;
    color: #6e7f96;
    margin-bottom: .2rem;
}
.editor-shell-a__section-title {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: .2rem;
}
.editor-shell-a__section-status {
    font-size: .98rem;
    color: #46617d;
}

.editor-shell-a__section-card.section-status-not-started {
    background: #fff2f3;
    border-color: #ecc4ca;
}
.editor-shell-a__section-card.section-status-in-progress {
    background: #fff6d8;
    border-color: #ecd681;
}
.editor-shell-a__section-card.section-status-complete {
    background: #fff3c7;
    border-color: #e8d37a;
}

.editor-shell-a__more {
    margin-top: .75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 54px;
    padding: .9rem 1rem;
    border-radius: 18px;
    border: 1px solid #dbe4ef;
    background: #f7f9fc;
    color: #47627e;
    font-weight: 700;
}

.editor-shell-a__main {
    min-width: 0;
}

.editor-shell-a__hero {
    padding: 1.25rem 1.4rem;
    margin-bottom: .8rem;
}
.editor-shell-a__hero h2 {
    margin: .35rem 0 .45rem;
    font-size: 3rem;
    color: #173b63;
}

.editor-shell-a__panel {
    padding: 1rem;
}

.editor-shell-a__panel-head {
    padding: .35rem .2rem 1rem;
}
.editor-shell-a__panel-head h3 {
    margin: .3rem 0 .4rem;
    font-size: 2.85rem;
    color: #173b63;
}

.editor-shell-a__cards {
    display: grid;
    gap: 1rem;
}

.editor-shell-a__question-card {
    border: 1px solid #dce5ef;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    overflow: hidden;
}

.editor-shell-a__question-head {
    padding: 1rem 1.15rem .4rem;
}
.editor-shell-a__question-head h4 {
    margin: .25rem 0 .35rem;
    font-size: 2.2rem;
    color: #173b63;
}
.editor-shell-a__panel-site--sm {
    font-size: 1rem;
}

.editor-shell-a__question-body {
    padding: .4rem 1.15rem 1.25rem;
}

.editor-shell-a__chip {
    display: inline-flex;
    align-items: center;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: #edf4fd;
    color: #2d62a1;
    font-size: .82rem;
    font-weight: 800;
    margin-bottom: .65rem;
}

.editor-shell-a__prompt {
    font-size: 1.4rem;
    line-height: 1.35;
    font-weight: 800;
    color: #213e64;
    margin-bottom: .25rem;
}
.editor-shell-a__question-body p {
    margin: 0 0 1rem;
    color: #5a718a;
    font-size: 1.03rem;
}

.editor-shell-a__field {
    display: grid;
    gap: .4rem;
}
.editor-shell-a__field--full {
    margin-bottom: .95rem;
}
.editor-shell-a__field label {
    font-size: 1.02rem;
    font-weight: 800;
    color: #173b63;
}

.editor-shell-a .form-control {
    min-height: 56px;
    border-radius: 16px;
    border: 1px solid #cfd9e6;
    background: #fff;
    padding: .85rem 1rem;
    font-size: 1.08rem;
    box-shadow: none;
}
.editor-shell-a textarea.form-control {
    min-height: 118px;
    resize: vertical;
}

.editor-shell-a__grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: .95rem;
}

.editor-shell-a__rating-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1rem;
    margin-bottom: .95rem;
}

.editor-shell-a__risk-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 126px;
    min-height: 44px;
    padding: .55rem .9rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 800;
}
.editor-shell-a__risk-pill.risk-low { background: #dff1e5; color: #197244; }
.editor-shell-a__risk-pill.risk-moderate { background: #fff3c7; color: #8a6c00; }
.editor-shell-a__risk-pill.risk-significant { background: #ffdfea; color: #a53663; }
.editor-shell-a__risk-pill.risk-high { background: #ffd8d8; color: #b42318; }
.editor-shell-a__risk-pill.risk-none { background: #edf2f7; color: #60738a; }

.editor-shell-a__photos {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}
.editor-shell-a__photo {
    width: 150px;
    height: 96px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #dce5ef;
    background: #f5f8fc;
}
.editor-shell-a__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.editor-shell-a__photo-add {
    width: 130px;
    height: 96px;
    border-radius: 16px;
    border: 1px dashed #c5d1df;
    background: #fafbfd;
    color: #425d78;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}
.editor-shell-a__photo-input { display: none; }

.editor-shell-a__actions {
    position: sticky;
    bottom: 1rem;
    margin-top: .8rem;
    padding: .95rem 1.1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    z-index: 3;
}

.editor-shell-a__actions-left,
.editor-shell-a__actions-right {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
}

.editor-shell-a .button {
    min-height: 54px;
    min-width: 112px;
    border-radius: 14px;
    font-size: 1.05rem;
    padding: .8rem 1.25rem;
    box-shadow: none;
}
.editor-shell-a .button.ghost {
    background: #f4f7fb;
    color: #355170;
    border: 1px solid #d0dae7;
}
.editor-shell-a__submit {
    background: linear-gradient(90deg, #2e8b57 0%, #4caf50 100%);
}

@media (max-width: 1200px) {
    .editor-shell-a {
        grid-template-columns: 1fr;
    }
    .editor-shell-a__rail {
        position: static;
    }
}

@media (max-width: 900px) {
    .editor-shell-a__grid-3,
    .editor-shell-a__rating-row {
        grid-template-columns: 1fr;
    }
    .editor-shell-a__actions {
        position: static;
        flex-direction: column;
    }
    .editor-shell-a__hero h2,
    .editor-shell-a__panel-head h3,
    .editor-shell-a__question-head h4 {
        font-size: 2rem;
    }
}


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

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.dashboard-header h1 {
    margin: 10px 0 10px;
    font-size: 3rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.dashboard-header p {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
}

.dashboard-toolbar {
    min-width: 340px;
    display: grid;
    gap: 14px;
    justify-items: end;
}

.toolbar-search,
.toolbar-filters span,
.table-toolbar span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.82);
    color: var(--muted);
    box-shadow: 0 10px 30px rgba(8,48,90,.05);
}

.toolbar-search {
    min-width: 220px;
    justify-content: flex-start;
}

.toolbar-search::before {
    content: 'âŒ•';
    font-size: 1.1rem;
}

.toolbar-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: end;
}

.dashboard-create-button {
    min-height: 44px;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0,94,184,.22);
}

.dashboard-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.dashboard-metric-card,
.dashboard-panel {
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(213,225,238,.95);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(8,48,90,.08);
}

.dashboard-metric-card {
    padding: 18px 20px;
}

.dashboard-metric-label {
    color: var(--muted);
    font-size: .95rem;
    margin-bottom: 8px;
}

.dashboard-metric-value {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr .72fr;
    gap: 16px;
    align-items: stretch;
}

.dashboard-lower-grid {
    display: grid;
    grid-template-columns: .95fr 1.45fr 1fr;
    gap: 16px;
    align-items: start;
}

.dashboard-panel {
    padding: 24px;
}

.dashboard-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-panel-header h3 {
    margin: 0;
    font-size: 1.65rem;
    line-height: 1.15;
}

.dashboard-panel-header span {
    color: var(--muted);
    font-weight: 600;
}

.coverage-layout,
.high-risk-layout {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 20px;
    align-items: center;
}

.coverage-chart-wrap,
.high-risk-chart-wrap {
    position: relative;
    min-height: 280px;
}

.coverage-legend,
.high-risk-legend,
.activity-feed,
.risk-bars {
    display: grid;
    gap: 14px;
}

.coverage-legend-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(217,227,238,.7);
}

.coverage-legend-row:last-child {
    border-bottom: none;
}

.coverage-legend-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    min-width: 0;
}

.coverage-dot,
.risk-swatch {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    flex: 0 0 12px;
}

.coverage-footer {
    display: flex;
    gap: 18px;
    margin-top: 10px;
    flex-wrap: wrap;
    color: var(--muted);
}

.coverage-mini-key {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;
}

.activity-chart-wrap {
    min-height: 250px;
    position: relative;
}

.activity-summary,
.risk-meta-card {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    color: var(--muted);
}

.activity-summary strong,
.risk-meta-card strong {
    display: block;
    color: var(--text);
    font-size: 1.6rem;
    line-height: 1.1;
    margin-top: 4px;
}

.activity-summary-icon,
.risk-meta-icon {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 2px solid rgba(37,99,235,.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 1.2rem;
}

.risk-bar-row {
    display: grid;
    grid-template-columns: 96px 1fr 34px;
    gap: 12px;
    align-items: center;
}

.risk-bar-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.risk-bar-track {
    position: relative;
    height: 14px;
    border-radius: 999px;
    background: #ebf1f7;
    overflow: hidden;
}

.risk-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
}

.risk-low { background: #83d19b; }
.risk-medium { background: #f4b63f; }
.risk-significant { background: #f05f93; }
.risk-high { background: #f28b54; }

.high-risk-findings-total {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.high-risk-findings-total strong {
    font-size: 2rem;
    line-height: 1;
}

.high-risk-findings-total span {
    color: var(--muted);
}

.dashboard-table-wrap {
    overflow-x: auto;
}

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

.dashboard-table th,
.dashboard-table td {
    padding: 14px 10px;
    border-bottom: 1px solid rgba(217,227,238,.7);
    text-align: left;
    white-space: nowrap;
}

.dashboard-table th {
    color: #6a8098;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 7px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .9rem;
}

.status-draft {
    background: #f4e2ad;
    color: #6b4e05;
}

.status-submitted,
.status-low {
    background: #dff4e4;
    color: #256b43;
}

.status-medium {
    background: #fff1cd;
    color: #8a6200;
}

.status-significant {
    background: #ffdfea;
    color: #a53663;
}

.status-high {
    background: #fee1d7;
    color: #a64116;
}

.dashboard-open-link {
    color: var(--muted);
    font-weight: 700;
}

.dashboard-open-link:hover {
    color: var(--nhs-accent);
    text-decoration: none;
}

.activity-feed-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    align-items: start;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(217,227,238,.7);
}

.activity-feed-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: linear-gradient(180deg, #dceafb 0%, #bcd7f6 100%);
    color: #24508b;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.activity-feed-copy {
    color: var(--text);
    line-height: 1.45;
}

.activity-feed-copy strong {
    font-weight: 800;
}

.activity-feed-copy span,
.activity-feed-footer {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.activity-feed-footer {
    margin-top: 20px;
    font-weight: 700;
    text-align: right;
}

@media (max-width: 1400px) {
    .dashboard-main-grid,
    .dashboard-lower-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-panel-narrow,
    .dashboard-panel-activity,
    .dashboard-panel-compact,
    .dashboard-panel-table,
    .dashboard-panel-wide {
        grid-column: auto;
    }
}

@media (max-width: 1100px) {
    .dashboard-header {
        grid-template-columns: 1fr;
        display: grid;
    }

    .dashboard-toolbar {
        min-width: 0;
        justify-items: start;
    }

    .toolbar-filters {
        justify-content: start;
    }

    .dashboard-metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .coverage-layout,
    .high-risk-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .dashboard-metric-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header h1 {
        font-size: 2.25rem;
    }

    .dashboard-panel {
        padding: 18px;
    }

    .dashboard-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .risk-bar-row {
        grid-template-columns: 1fr;
    }
}

.sidebar-topbar, .sidebar-toggle, .brand, .nav, .nav-submenu { display:none; }
.multi-shell { grid-template-columns: 320px 1fr; }
 .suite-sidebar {
    padding: 22px 14px;
    gap: 14px;
    background: radial-gradient(circle at top left, rgba(75,122,210,.30), transparent 34%), linear-gradient(180deg, #17396c 0%, #102b57 100%);
    border-right: 1px solid rgba(255,255,255,.06);
}
.suite-logo { font-size: 3.2rem; font-weight: 800; letter-spacing: -.04em; color: #fff; line-height: 1; }
.suite-divider { height: 1px; background: rgba(255,255,255,.10); }
.suite-home-nav, .suite-solution-list { display:grid; gap: 10px; }
.suite-home-link {
    display:flex; align-items:center; gap:10px; color:#fff; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.08);
    border-radius: 16px; padding: 12px 14px; font-weight:700;
}
.suite-home-link.active, .suite-solution-links a.active { background: rgba(255,255,255,.14); }
.suite-home-link:hover, .suite-solution-links a:hover { text-decoration:none; background: rgba(255,255,255,.12); }
.suite-section-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: rgba(255,255,255,.62); font-weight: 700; margin: 2px 2px 0; }
.suite-solution-card {
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 10px 24px rgba(0,0,0,.16);
    overflow: hidden;
}
.suite-solution-card--compact { backdrop-filter: blur(10px); }
.suite-solution-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding: 16px 14px; color:#fff; }
.suite-solution-header--compact { align-items: center; }
.suite-solution-leading { display:grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: start; width: 100%; }
.suite-solution-copy { display:grid; gap: 4px; min-width: 0; }
.suite-solution-title { font-size: 1.05rem; font-weight: 800; line-height:1.1; color: #fff; }
.suite-solution-subtitle { color: rgba(255,255,255,.76); font-size: .82rem; line-height: 1.25; }
.suite-solution-status { margin-top: 6px; }
.suite-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(246, 206, 76, .16);
    border: 1px solid rgba(246, 206, 76, .34);
    color: #f6d975;
    font-size: .74rem;
    font-weight: 700;
}
.suite-chevron {
    color: rgba(255,255,255,.72);
    font-size: 1.45rem;
    line-height: 1;
    transition: transform .2s ease;
    align-self: center;
    margin-left: 8px;
}
.suite-solution-links { display:grid; gap: 6px; padding: 0 14px 14px; }
.suite-solution-links a, .suite-disabled {
    color:#fff;
    padding: 11px 12px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    font-size:.92rem;
    display:flex;
    align-items:center;
    gap: 8px;
    border-radius: 14px;
}
.suite-disabled { color: rgba(255,255,255,.6); }
.suite-admin-label { color:#fff; padding: 16px 12px 10px; border-top:1px solid rgba(255,255,255,.1); font-size:1.02rem; font-weight:700; }
.suite-badge {
    display:inline-flex; margin-left:10px; background: rgba(255,207,64,.18); color:#ffe07a; border:1px solid rgba(255,207,64,.36); padding: 6px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700;
}
.suite-user-card { background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04)); border:1px solid rgba(255,255,255,.1); border-radius: 22px; padding:16px; color:#fff; }
.suite-user-card strong { display:block; font-size:1.05rem; margin-bottom:6px; }
.suite-user-card span { display:block; color: rgba(255,255,255,.75); margin-top:4px; font-size: .85rem; }
.suite-user-actions { display:flex; gap:12px; margin-top:16px; padding-top:14px; border-top:1px solid rgba(255,255,255,.08); }
.suite-icon-button { width:44px; height:44px; border-radius:14px; display:grid; place-items:center; background:rgba(255,255,255,.08); color:#fff; border:1px solid rgba(255,255,255,.12); font-size:1.1rem; }
.suite-icon-button:hover { text-decoration:none; background:rgba(255,255,255,.14); }
.suite-solution-badge {
    width: 62px;
    height: 62px;
    border-radius: 0;
    display: grid;
    place-items: center;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}
.suite-solution-badge--image img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
}
.suite-admin-dropdown { display:grid; gap: 8px; margin-top: 2px; }
.suite-admin-toggle {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 11px 12px;
    color:#fff;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    cursor: pointer;
    font-size: .92rem;
    font-weight: 700;
}
.suite-admin-toggle:hover { background: rgba(255,255,255,.09); }
.suite-admin-links { display:grid; gap: 6px; padding-top: 2px; }
.suite-admin-links a { padding-left: 14px; }
.portal-content { padding: 34px 36px; }
.portal-hero { display:grid; gap:24px; margin-bottom: 26px; }
.portal-topbar { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; }
.portal-brandline { font-size: 1.15rem; color: #283b56; margin-bottom: 12px; }
.portal-brand-accent { color: #0b51ad; font-weight:800; font-size: 2.2rem; letter-spacing:-.03em; vertical-align: middle; margin-right: 6px; }
.portal-hero h1 { margin:0 0 10px; font-size: 3.5rem; line-height:1.1; }
.portal-hero p { margin:0; color: var(--muted); font-size: 1.25rem; }
.portal-toolbar { display:grid; gap:16px; min-width: 380px; }
.portal-search { display:flex; align-items:center; gap:12px; background:#fff; border:1px solid var(--line); border-radius:16px; padding: 12px 16px; box-shadow: 0 8px 22px rgba(8,48,90,.06); }
.portal-search input { border:none; padding:0; margin:0; outline:none; }
.portal-banner { background: rgba(255,255,255,.5); border:1px solid var(--line); border-radius: 18px; padding: 18px 20px; color:#334d6a; font-size:1.12rem; }
.portal-module-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:22px; margin-bottom:24px; }
.portal-module-card { background:#fff; border:1px solid var(--line); border-radius:24px; padding:22px; box-shadow:0 12px 35px rgba(8,48,90,.08); display:grid; gap:16px; }
.portal-module-card h3 { margin:0; font-size:2rem; }
.portal-module-card p { margin:0; color:var(--muted); min-height:96px; font-size:1.1rem; line-height:1.55; }
.module-icon-wrap { width: 84px; height: 84px; display:grid; place-items:center; }
.module-icon-wrap--admin { width: 72px; height: 72px; }
.module-icon-image { width: 76px; height: 76px; object-fit: contain; display:block; }
.accent-blue { background: linear-gradient(135deg, #6097f3, #2466c9); }
.accent-teal { background: linear-gradient(135deg, #81d0d5, #4a98a0); }
.accent-orange { background: linear-gradient(135deg, #ffb18f, #f17b4d); }
.accent-gold { background: linear-gradient(135deg, #f3d87d, #e6ab1e); }
.accent-soft { background: linear-gradient(135deg, #bfd2ff, #96b3ea); }
.module-button.accent-blue, .module-button.accent-orange { background: #356dd8; }
.module-button.accent-teal { background: #5f95a7; }
.module-button.accent-gold { background: #e4af2e; }
.module-button.disabled { background: #d8e2ee; color:#6a7d92; cursor:default; }
.module-meta { display:flex; justify-content:space-between; gap:12px; color:#688098; font-size:.92rem; padding-top:8px; border-top:1px solid #edf2f7; }
.portal-admin-grid { display:grid; grid-template-columns: 1fr 1.2fr; gap:22px; }
.portal-admin-card, .portal-suite-card { background:#fff; border:1px solid var(--line); border-radius:24px; padding:22px; box-shadow:0 12px 35px rgba(8,48,90,.08); }
.portal-admin-card { display:grid; grid-template-columns: auto 1fr auto; gap:20px; align-items:center; }
.portal-admin-card h3, .portal-suite-card h3 { margin:0 0 6px; font-size:2rem; }
.portal-suite-card p, .portal-admin-card p { color:var(--muted); margin:0; }
.suite-card-header { display:grid; grid-template-columns:auto 1fr auto; gap:18px; align-items:center; margin-bottom: 14px; }
.suite-links { display:grid; }
.suite-links a { color: var(--text); padding: 16px 10px; border-top:1px solid var(--line); font-size:1.1rem; }
.suite-links a:hover { text-decoration:none; background:#f5f8fc; border-radius: 12px; }
.admin-submenu-links { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.admin-submenu-links a { padding:10px 14px; border-radius: 999px; background:#eef4fb; color:#355678; }
.admin-submenu-links a.active { background: var(--nhs-accent); color:#fff; }
.license-row { display:grid; grid-template-columns: 1.5fr .7fr .7fr; gap:18px; align-items:center; padding: 18px 0; border-top:1px solid var(--line); }
.license-row:first-child { border-top:none; }
.solution-user-card { border-top:1px solid var(--line); padding-top:20px; }
.solution-user-card:first-of-type { border-top:none; padding-top:0; }
.user-edit-grid-wide { grid-template-columns: repeat(6, 1fr); }
.solution-access-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:14px; margin-top:16px; }
.solution-access-grid h4 { margin:0 0 10px; font-size:1.1rem; }
@media (max-width: 1500px) {
    .portal-module-grid { grid-template-columns: repeat(2, 1fr); }
    .portal-admin-grid, .portal-admin-card, .suite-card-header, .portal-topbar { grid-template-columns:1fr; display:grid; }
    .portal-toolbar { min-width: 0; }
    .solution-access-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 1100px) {
    .multi-shell { grid-template-columns: 1fr; }
    .portal-module-grid, .portal-admin-grid, .solution-access-grid, .license-row, .user-edit-grid-wide { grid-template-columns:1fr; }
    .portal-hero h1 { font-size: 2.6rem; }
}


.suite-logo-wrap { display:grid; gap:6px; }
.suite-portal-name { color: rgba(255,255,255,.92); font-weight: 700; font-size: 1.1rem; }
.suite-portal-kicker { color: rgba(255,255,255,.65); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.suite-solution-card summary { list-style: none; }
.suite-solution-card summary::-webkit-details-marker { display:none; }
.suite-solution-card { border-radius: 22px; overflow: hidden; }
.suite-solution-card[open] .suite-chevron { transform: rotate(180deg); }
.suite-solution-header { cursor: pointer; }
.suite-chevron { transition: transform .2s ease; }
.suite-solution-links a.active { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.2); }

.suite-company-logo {
    max-width: 100%;
    max-height: 72px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,.18));
}

.suite-powered-by {
    margin-top: 8px;
    color: rgba(255,255,255,.92);
    font-size: .86rem;
}

.finder-card,
.settings-shell {
    display: grid;
    gap: 24px;
}

.finder-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.finder-actions {
    display: flex;
    align-items: end;
    gap: 12px;
}

.finder-summary-grid {
    margin-top: 0;
}

.table-card-header h3 {
    margin: 0 0 4px;
}

.empty-state-inline {
    padding: 14px 0;
    color: var(--muted);
}

.settings-section {
    display: grid;
    gap: 18px;
}

.settings-section-header h3 {
    margin: 0 0 6px;
}

.branding-settings-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 20px;
}

.logo-preview-card {
    min-height: 140px;
    border: 1px dashed var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, #fbfdff 0%, #f3f7fb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.settings-logo-preview {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
}

.settings-logo-placeholder,
.small-text {
    color: var(--muted);
}

@media (max-width: 1200px) {
    .finder-form-grid,
    .branding-settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .finder-form-grid,
    .branding-settings-grid {
        grid-template-columns: 1fr;
    }

    .finder-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

.metric-inline { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:12px 0; border-top:1px solid var(--line); }
.metric-inline:first-child { border-top:none; }
.metric-inline strong { font-size:1.3rem; }
.chart-list { display:grid; gap:14px; }
.chart-row { display:grid; grid-template-columns: 110px 1fr 50px; gap:12px; align-items:center; }
.chart-label, .chart-value { font-weight:600; }
.chart-bar-wrap { height:12px; border-radius:999px; background:#e8eef6; overflow:hidden; }
.chart-bar { height:100%; border-radius:999px; background:linear-gradient(90deg, var(--nhs-accent), #4c8fd8); }
.chart-bar.alt { background:linear-gradient(90deg, #0f766e, #63c6b6); }
.status-pill { display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; font-size:.85rem; font-weight:700; background:#e9f2fb; color:#0f4f8a; }
.status-logged { background:#eef2ff; color:#3730a3; }
.status-assigned { background:#ecfeff; color:#155e75; }
.status-in-progress { background:#fff7ed; color:#c2410c; }
.status-on-hold { background:#fffbea; color:#92400e; }
.status-completed { background:#ecfdf3; color:#166534; }
.status-cancelled { background:#fef2f2; color:#991b1b; }
.button-small { padding:8px 12px; border-radius:12px; font-size:.9rem; }
.compact-filters { margin-bottom:24px; }
.timeline-list { display:grid; gap:18px; }
.timeline-item { display:grid; grid-template-columns: 18px 1fr; gap:14px; align-items:flex-start; }
.timeline-dot { width:12px; height:12px; margin-top:6px; border-radius:999px; background:var(--nhs-accent); box-shadow:0 0 0 5px rgba(0,94,184,.12); }
.two-col-summary { grid-template-columns: repeat(2, 1fr); }
.solution-user-card { border-top:1px solid var(--line); padding-top:20px; }
.solution-access-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; }
@media (max-width: 1200px) { .solution-access-grid, .two-col-summary, .chart-row { grid-template-columns:1fr; } .chart-row { gap:8px; } }


.suite-solution-heading {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 14px;
    align-items: start;
}
.suite-solution-badge {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.12);
    display: grid;
    place-items: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.suite-solution-badge img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}
.suite-solution-badge--neutral {
    background: rgba(255,255,255,.08);
}
.suite-solution-header {
    align-items: center;
}
.suite-solution-links a,
.suite-admin-links a {
    display: flex;
    align-items: center;
    gap: 10px;
}
.suite-link-glyph {
    width: 18px;
    text-align: center;
    opacity: .88;
}
.suite-admin-dropdown {
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 12px;
}
.suite-admin-dropdown summary {
    list-style: none;
}
.suite-admin-dropdown summary::-webkit-details-marker {
    display: none;
}
.suite-admin-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    font-weight: 700;
}
.suite-admin-links {
    display: grid;
    gap: 2px;
    margin-top: 8px;
}
.suite-chevron {
    display: none;
}
.ticket-log-shell {
    display: grid;
    gap: 22px;
}
.ticket-log-card {
    display: grid;
    gap: 22px;
}
.ticket-log-card-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: start;
}
.ticket-log-card-header h3 {
    margin: 6px 0 8px;
    font-size: 1.55rem;
}
.ticket-log-card-header p {
    margin: 0;
    color: var(--muted);
}
.ticket-log-tip {
    align-self: start;
    padding: 12px 14px;
    border-radius: 16px;
    background: #eef5fc;
    color: #355678;
    border: 1px solid #d8e6f5;
    max-width: 320px;
    font-size: .96rem;
    line-height: 1.5;
}
.ticket-form-grid {
    gap: 20px;
}
.ticket-form-grid input,
.ticket-form-grid select,
.ticket-form-grid textarea {
    margin-top: 10px;
    border-radius: 16px;
    border-color: #cfdbe7;
    padding: 14px 16px;
}
.ticket-form-grid label {
    color: #203a57;
}
.ticket-log-actions {
    margin-top: 0;
}
.ticket-conditional-field[hidden] {
    display: none !important;
}
@media (max-width: 1100px) {
    .ticket-log-card-header {
        grid-template-columns: 1fr;
    }
    .ticket-log-tip {
        max-width: none;
    }
}


/* Final sidebar/home icon overrides: use raw PNGs with no badge box */
.suite-solution-leading {
    grid-template-columns: 78px 1fr !important;
    gap: 14px !important;
}

.suite-solution-badge,
.suite-solution-badge--image,
.suite-solution-badge--neutral {
    width: 72px !important;
    height: 72px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.suite-solution-badge img,
.suite-solution-badge--image img,
.suite-solution-badge--neutral img {
    width: 72px !important;
    height: 72px !important;
    display: block !important;
    object-fit: contain !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    filter: none !important;
}

.portal-module-card .module-icon-wrap,
.portal-admin-card .module-icon-wrap,
.portal-suite-card .module-icon-wrap {
    width: 96px !important;
    height: 96px !important;
}

.portal-module-card .module-icon-image,
.portal-admin-card .module-icon-image,
.portal-suite-card .module-icon-image {
    width: 88px !important;
    height: 88px !important;
    object-fit: contain !important;
    display: block !important;
}


.ticket-upload-help { margin-top: 8px; color: var(--muted); font-size: .92rem; }
.ticket-reporter-summary { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:18px; padding:18px 20px; border:1px solid var(--line); border-radius:18px; background:#f8fbfe; }
.ticket-reporter-summary strong { display:block; margin-top:4px; }
.ticket-image-panel { margin-top: 16px; display:grid; gap:10px; }
.ticket-detail-image { width:100%; max-width:420px; border-radius:18px; border:1px solid var(--line); box-shadow:0 12px 30px rgba(8,48,90,.08); }
.queue-header { margin-bottom: 18px; }
.queue-kpi-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:18px; margin-bottom: 22px; }
.queue-kpi-card { background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); border:1px solid #d8e3ef; border-radius:22px; padding:20px 22px; box-shadow:0 12px 28px rgba(8,48,90,.07); display:grid; gap:8px; }
.queue-kpi-label { color:#5f7691; font-weight:700; text-transform:uppercase; letter-spacing:.08em; font-size:.78rem; }
.queue-kpi-card strong { font-size:2rem; line-height:1; color:#12375b; }
.queue-kpi-foot { color:var(--muted); font-size:.92rem; }
.queue-filter-card { display:grid; gap:18px; border-radius:24px; }
.queue-filter-header { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; }
.queue-filter-header h3, .queue-table-header h3 { margin:0 0 6px; }
.queue-filter-header p, .queue-table-header p { margin:0; color:var(--muted); }
.queue-filter-grid { gap:18px; }
.queue-filter-grid input, .queue-filter-grid select { margin-top:10px; }
.queue-table-card { border-radius:24px; overflow:hidden; }
.queue-table-header { display:flex; justify-content:space-between; align-items:center; padding:22px 22px 0; }
.queue-table { width:100%; border-collapse:separate; border-spacing:0; }
.queue-table thead th { background:#f8fbfe; position:sticky; top:0; z-index:1; }
.queue-table tbody tr:hover { background:#fbfdff; }
.queue-inline-meta { color:var(--muted); font-size:.9rem; margin-top:4px; }
.queue-issue-cell { display:grid; gap:4px; }
.priority-pill { display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; font-size:.85rem; font-weight:700; background:#eef4fb; color:#25496d; }
.priority-routine { background:#eef4fb; color:#355678; }
.priority-urgent { background:#fff4e5; color:#b45309; }
.priority-critical { background:#fef2f2; color:#b91c1c; }
@media (max-width: 1200px) { .queue-kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 900px) { .ticket-reporter-summary, .queue-kpi-grid, .queue-filter-header { grid-template-columns: 1fr; display:grid; } }

.settings-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.toggle-card {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #f8fafc;
}

.toggle-card input,
.toggle-inline input {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.2rem;
}

.toggle-card strong,
.toggle-inline span {
    display: block;
}

.toggle-card small {
    display: block;
    color: #64748b;
    margin-top: 0.2rem;
}

.settings-form-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.settings-form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-form-grid .full-width {
    grid-column: 1 / -1;
}

.settings-split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.toggle-inline {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

@media (max-width: 900px) {
    .settings-form-grid.two-columns,
    .settings-split-grid {
        grid-template-columns: 1fr;
    }
}

.settings-shell-polished {
    display: grid;
    gap: 22px;
    border-radius: 28px;
    padding: 24px;
}
.settings-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 20px;
}
.settings-hero-card,
.polished-sub-card {
    border: 1px solid #dbe6f2;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 22px;
    box-shadow: 0 16px 36px rgba(8,48,90,.06);
}
.settings-hero-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf4fb;
    color: #47627e;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.settings-hero-card h3,
.polished-sub-card h4 {
    margin: 0 0 8px;
    color: #12375b;
}
.settings-hero-card p,
.polished-sub-card p {
    margin: 0;
}
.settings-guidance-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
    color: var(--muted);
}
.settings-guidance-list code {
    font-size: .9em;
}
.branding-settings-grid.compact {
    margin-top: 16px;
}
.settings-logo-panel {
    min-height: 150px;
}
.toggle-card-strong {
    border: 1px solid #d9e6f3;
    background: linear-gradient(180deg, #fcfdff 0%, #f4f8fc 100%);
}
.compact-toggle {
    margin-bottom: 6px;
}
.single-row {
    grid-template-columns: minmax(280px, 420px);
}
.polished-split-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 20px;
}
.emphasis-panel {
    background: linear-gradient(180deg, #0f2f4c 0%, #17456e 100%);
    border-color: rgba(255,255,255,.08);
    color: #fff;
}
.emphasis-panel h4,
.emphasis-panel p,
.emphasis-panel strong {
    color: inherit;
}
.settings-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
.settings-chip {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    font-size: .88rem;
}
.settings-inline-toggles {
    display: grid;
    gap: 10px;
}
.settings-placeholder-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.settings-placeholder {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    font-family: Consolas, 'Courier New', monospace;
    font-size: .86rem;
}
.settings-callout {
    margin-top: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.16);
}
.settings-callout p {
    margin-top: 6px;
}
.adaptive-card-editor textarea {
    min-height: 320px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: .92rem;
}
.sticky-actions {
    position: sticky;
    bottom: 0;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    padding: 18px 0 0;
    margin-top: -4px;
}
@media (max-width: 1100px) {
    .settings-hero-grid,
    .polished-split-grid {
        grid-template-columns: 1fr;
    }
}


.teams-test-panel {
    margin-top: 1rem;
}

.test-grid {
    align-items: end;
}

.test-button-wrap {
    display: flex;
    align-items: end;
    min-height: 100%;
}

.teams-test-result {
    margin-top: 1rem;
    border-radius: 22px;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
}

.teams-test-success {
    box-shadow: 0 12px 30px rgba(21, 128, 61, 0.08);
}

.teams-test-failure {
    box-shadow: 0 12px 30px rgba(185, 28, 28, 0.08);
}

.teams-test-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.teams-test-result-grid div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.9);
}

.code-wrap {
    overflow-wrap: anywhere;
}

.teams-test-block {
    margin-top: 0.9rem;
}

.teams-test-block pre {
    margin: 0.45rem 0 0;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: #0f172a;
    color: #e2e8f0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}


.toilet-module-header{
    align-items:flex-start;
}

.toilet-module-header-meta{
    display:grid;
    gap:8px;
    justify-items:end;
    text-align:right;
}

.toilet-kpis{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:16px;
    margin-bottom:18px;
}

.toilet-kpi-card{
    background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
    border:1px solid rgba(15,23,42,.08);
    border-radius:24px;
    padding:20px;
    box-shadow:0 10px 32px rgba(15,23,42,.05);
    display:flex;
    flex-direction:column;
    gap:8px;
}

.toilet-kpi-card span{
    color:#64748b;
    font-size:.95rem;
}

.toilet-kpi-card strong{
    font-size:2rem;
    color:#0f172a;
}

.toilet-grid{
    margin-bottom:18px;
}

.toilet-panel{
    overflow:hidden;
}

.toilet-panel-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    margin-bottom:14px;
}

.toilet-panel-head h3{
    margin:0 0 4px;
}

.toilet-chart{
    height:260px;
    display:grid;
    grid-auto-flow:column;
    align-items:end;
    gap:8px;
    padding-top:12px;
}

.toilet-bar-wrap{
    display:grid;
    grid-template-rows:1fr auto;
    gap:10px;
    height:100%;
}

.toilet-bar{
    align-self:end;
    background:linear-gradient(180deg,#38bdf8,#14b8a6);
    border-radius:14px 14px 6px 6px;
    min-height:4px;
}

.toilet-bar-label{
    text-align:center;
    color:#64748b;
    font-size:.8rem;
}

.toilet-alert-list{
    display:grid;
    gap:12px;
}

.toilet-alert{
    border:1px solid rgba(15,23,42,.08);
    border-left-width:5px;
    border-radius:18px;
    padding:14px 16px;
    background:#fff;
}

.toilet-alert.critical{ border-left-color:#dc2626; }
.toilet-alert.warning{ border-left-color:#d97706; }
.toilet-alert.info{ border-left-color:#0ea5e9; }

.toilet-alert h4{
    margin:0 0 6px;
}

.toilet-alert p,
.toilet-alert small{
    margin:0;
    color:#64748b;
}

.table-wrap{
    overflow-x:auto;
}

.metric-value{
    font-size:2rem;
    font-weight:700;
    color:#0f172a;
}

.compact-list{
    margin:0;
    padding-left:18px;
}

@media (max-width: 1200px){
    .toilet-kpis{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 768px){
    .toilet-kpis{
        grid-template-columns:1fr;
    }

    .toilet-module-header-meta{
        justify-items:start;
        text-align:left;
    }
}

/* Water Solution dashboard */
.water-hero{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.5fr);gap:22px;align-items:stretch;margin-bottom:20px;padding:28px;border-radius:34px;background:radial-gradient(circle at 12% 18%, rgba(20,184,166,.26), transparent 34%),radial-gradient(circle at 88% 10%, rgba(56,189,248,.22), transparent 32%),linear-gradient(135deg,#06283d 0%,#0f766e 52%,#0369a1 100%);color:#fff;box-shadow:0 24px 70px rgba(3,105,161,.24);overflow:hidden;position:relative}.water-hero:after{content:"";position:absolute;width:360px;height:360px;right:-130px;bottom:-170px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.16)}.water-hero-content,.water-hero-status{position:relative;z-index:1}.water-hero .eyebrow{color:rgba(255,255,255,.78)}.water-hero h2{margin:.2rem 0 .5rem;font-size:clamp(2.2rem,4vw,4rem);letter-spacing:-.06em}.water-hero p{max-width:760px;color:rgba(255,255,255,.86);font-size:1.08rem;line-height:1.6}.water-hero-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:18px}.water-live-pill,.water-panel-tag{display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:8px 12px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.22);color:#fff;font-weight:700;font-size:.88rem}.water-live-pill:before{content:"";width:8px;height:8px;border-radius:999px;background:#22c55e;box-shadow:0 0 0 5px rgba(34,197,94,.2)}.water-hero-status{display:flex;align-items:flex-end;justify-content:flex-end}.water-status-card{width:100%;border-radius:28px;padding:20px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(14px)}.water-status-card span,.water-status-card small{display:block;color:rgba(255,255,255,.74)}.water-status-card strong{display:block;margin:8px 0;font-size:1.8rem}.water-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px;margin-bottom:18px}.water-kpi-card{position:relative;overflow:hidden;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);border:1px solid rgba(15,23,42,.08);border-radius:26px;padding:18px;box-shadow:0 12px 36px rgba(15,23,42,.06);display:flex;flex-direction:column;gap:7px;min-height:166px}.water-kpi-card:after{content:"";position:absolute;inset:auto -30px -55px auto;width:120px;height:120px;border-radius:999px;background:rgba(14,165,233,.08)}.water-kpi-card.primary{background:linear-gradient(145deg,#ecfeff 0%,#ffffff 48%,#eff6ff 100%);border-color:rgba(14,165,233,.22)}.water-kpi-card.warning:after{background:rgba(245,158,11,.1)}.water-kpi-card.danger:after{background:rgba(239,68,68,.09)}.water-kpi-icon{width:42px;height:42px;border-radius:16px;display:grid;place-items:center;background:#f1f5f9;font-size:1.25rem}.water-kpi-card span{color:#64748b;font-size:.92rem;font-weight:700}.water-kpi-card strong{font-size:2rem;letter-spacing:-.04em;color:#0f172a}.water-kpi-card small{color:#94a3b8;line-height:1.35}.water-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(360px,.75fr);gap:18px;margin-bottom:18px}.water-panel{overflow:hidden;border-radius:28px;border:1px solid rgba(15,23,42,.08);box-shadow:0 14px 44px rgba(15,23,42,.055)}.water-panel-large{min-width:0}.water-panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}.water-panel-head h3{margin:0 0 4px;letter-spacing:-.02em}.water-panel-tag{background:#ecfeff;color:#0f766e;border-color:#ccfbf1}.water-chart{height:280px;display:grid;grid-auto-flow:column;align-items:end;gap:8px;padding:12px 2px 0}.water-bar-wrap{display:grid;grid-template-rows:auto 1fr auto;gap:8px;height:100%;align-items:end}.water-bar-value{min-height:16px;text-align:center;color:#0f766e;font-size:.72rem;font-weight:800}.water-bar{align-self:end;background:linear-gradient(180deg,#67e8f9,#14b8a6 70%,#0f766e);border-radius:16px 16px 7px 7px;min-height:5px;box-shadow:0 10px 20px rgba(20,184,166,.22)}.water-bar-label{text-align:center;color:#94a3b8;font-size:.72rem}.water-alert-list{display:grid;gap:12px;max-height:328px;overflow:auto;padding-right:2px}.water-alert{border:1px solid rgba(15,23,42,.08);border-left-width:6px;border-radius:20px;padding:15px 16px;background:#fff;box-shadow:0 8px 22px rgba(15,23,42,.04)}.water-alert.critical{border-left-color:#dc2626}.water-alert.warning{border-left-color:#d97706}.water-alert.info{border-left-color:#0ea5e9}.water-alert-title{display:flex;justify-content:space-between;gap:10px;align-items:center}.water-alert-title span{border-radius:999px;padding:4px 9px;background:#f1f5f9;color:#475569;font-size:.74rem;font-weight:800}.water-alert h4{margin:0 0 6px}.water-alert p,.water-alert small{margin:0;color:#64748b}.water-table th{color:#475569;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em}.water-role-badge,.water-source-badge{display:inline-flex;white-space:nowrap;border-radius:999px;padding:5px 9px;font-size:.78rem;font-weight:800}.water-role-badge{background:#f1f5f9;color:#334155}.water-source-badge.measured{background:#dcfce7;color:#166534}.water-source-badge.estimated{background:#fef3c7;color:#92400e}.water-empty-cell{padding:24px!important;text-align:center}@media (max-width:1200px){.water-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.water-dashboard-grid{grid-template-columns:1fr}}@media (max-width:768px){.water-hero{grid-template-columns:1fr;padding:22px;border-radius:26px}.water-hero-status{justify-content:flex-start}.water-kpis{grid-template-columns:1fr}.water-chart{gap:4px}.water-bar-label{font-size:.62rem}}

/* Water Solution v22.19 clean patch - modern Chart.js dashboard */
.water-chart {
    width: 100% !important;
    min-height: 320px;
    height: 320px !important;
}
.water-panel-large .water-chart {
    display: block;
}
.water-kpi-card.primary {
    background: radial-gradient(circle at top right, rgba(14,165,233,.22), transparent 42%), linear-gradient(135deg, #ffffff 0%, #eef8ff 100%);
}
.water-live-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border-radius: 999px;
    padding: .55rem .8rem;
    background: rgba(14,165,233,.12);
    color: #075985;
    font-weight: 700;
}
.water-role-badge, .water-source-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .35rem .6rem;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.water-role-badge { background: #ecfeff; color: #155e75; }
.water-source-badge.measured { background: #dcfce7; color: #166534; }
.water-source-badge.estimated { background: #fef9c3; color: #854d0e; }

/* Water Solution dashboard enhancements */
.water-executive-grid{
    align-items:stretch;
}

.water-story-panel{
    padding:22px;
}

.water-hero-inline-metrics{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    margin-top:22px;
}

.water-hero-inline-metrics > div,
.water-mini-status-item{
    border-radius:20px;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.18);
    padding:14px 16px;
}

.water-hero-inline-metrics span,
.water-mini-status-item span{
    display:block;
    font-size:.82rem;
    color:rgba(255,255,255,.7);
}

.water-hero-inline-metrics strong,
.water-mini-status-item strong{
    display:block;
    margin-top:6px;
    font-size:1.15rem;
    color:#fff;
}

.water-status-stack{
    display:grid;
    gap:16px;
}

.water-mini-status-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}

.water-insight-cards{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    margin-bottom:18px;
}

.water-insight-card{
    padding:18px;
    border-radius:22px;
    background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
    border:1px solid rgba(15,23,42,.07);
    box-shadow:0 10px 28px rgba(15,23,42,.04);
}

.water-insight-card span,
.water-side-section .water-section-title-row .muted,
.water-consumer-item small,
.water-activity-item small,
.water-stack-item small,
.water-severity-item small{
    color:#64748b;
}

.water-insight-card strong{
    display:block;
    margin:.3rem 0;
    font-size:1.7rem;
    letter-spacing:-.04em;
    color:#0f172a;
}

.water-insight-card small{
    display:block;
    line-height:1.45;
}

.water-narrative-panel,
.water-side-section{
    border-top:1px solid rgba(15,23,42,.07);
    padding-top:16px;
    margin-top:4px;
}

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

.water-section-title-row h4{
    margin:0;
    font-size:1rem;
}

.water-narrative-list{
    margin:0;
    padding-left:1.05rem;
    display:grid;
    gap:10px;
    color:#334155;
}

.water-stack-list,
.water-severity-list,
.water-consumer-list,
.water-activity-feed{
    display:grid;
    gap:12px;
}

.water-stack-item,
.water-severity-item,
.water-consumer-item,
.water-activity-item{
    padding:14px 16px;
    border-radius:18px;
    background:#fff;
    border:1px solid rgba(15,23,42,.07);
    box-shadow:0 8px 22px rgba(15,23,42,.04);
}

.water-stack-item-head,
.water-severity-item-head,
.water-consumer-item-head,
.water-activity-item-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
}

.water-stack-item strong,
.water-severity-item strong,
.water-consumer-item strong,
.water-activity-item strong{
    color:#0f172a;
}

.water-bar-track{
    width:100%;
    height:10px;
    border-radius:999px;
    background:#e2e8f0;
    overflow:hidden;
    margin-top:10px;
}

.water-bar-fill{
    height:100%;
    border-radius:999px;
    background:linear-gradient(90deg,#38bdf8 0%, #0f766e 100%);
}

.water-bar-fill.warning{
    background:linear-gradient(90deg,#fbbf24 0%, #d97706 100%);
}

.water-bar-fill.danger{
    background:linear-gradient(90deg,#fb7185 0%, #dc2626 100%);
}

.water-bar-fill.info{
    background:linear-gradient(90deg,#60a5fa 0%, #2563eb 100%);
}

.water-panel-head-wrap{
    flex-wrap:wrap;
}

.water-table-toolbar{
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.water-search-input{
    min-width:240px;
    border-radius:999px;
    padding-left:14px;
}

.water-chip-filter{
    display:inline-flex;
    gap:.35rem;
    padding:.25rem;
    border-radius:999px;
    background:rgba(15, 23, 42, .06);
    flex-wrap:wrap;
}

.water-consumer-meta,
.water-activity-meta{
    margin-top:8px;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    color:#64748b;
    font-size:.88rem;
}

.water-rank-badge,
.water-value-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:34px;
    height:34px;
    border-radius:999px;
    font-size:.82rem;
    font-weight:800;
}

.water-rank-badge{
    background:#ecfeff;
    color:#0f766e;
}

.water-value-badge{
    background:#eff6ff;
    color:#1d4ed8;
    min-width:auto;
    padding:0 12px;
}

.water-activity-item .water-value-badge{
    background:#f8fafc;
    color:#0f172a;
}

@media (max-width:1200px){
    .water-insight-cards,
    .water-hero-inline-metrics{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width:768px){
    .water-insight-cards,
    .water-hero-inline-metrics,
    .water-mini-status-grid{
        grid-template-columns:1fr;
    }

    .water-search-input{
        min-width:0;
        width:100%;
    }

    .water-table-toolbar{
        width:100%;
        justify-content:flex-start;
    }
}

/* Water Solution calibration admin */
.water-calibration-panel {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(14, 165, 233, .18);
    background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
}

.water-calibration-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: .45rem .8rem;
    background: #ecfeff;
    color: #155e75;
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
}

.water-calibration-help {
    display: grid;
    gap: .25rem;
    border-radius: 18px;
    padding: 1rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0f172a;
}

.water-calibration-help span {
    color: #475569;
}

.calibration-save-row {
    align-self: end;
    min-height: 42px;
}

.water-calibration-result {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .85rem;
}

.water-calibration-result > div {
    border-radius: 18px;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.water-calibration-result span,
.water-calibration-result small {
    display: block;
    color: #64748b;
}

.water-calibration-result strong {
    display: block;
    margin: .25rem 0;
    color: #0f172a;
    font-size: 1.25rem;
}

/* Water Solution command-centre upgrades */
.water-command-shell{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:1rem;align-items:start;margin:1rem 0}.water-command-main{display:grid;grid-template-columns:360px minmax(0,1fr);gap:1rem}.water-command-score{position:relative;overflow:hidden}.water-command-score:before{content:"";position:absolute;inset:-40%;background:radial-gradient(circle,rgba(0,120,212,.14),transparent 55%);animation:waterRadar 5s linear infinite}.water-command-score>*{position:relative}.water-score-ring{--score:0;width:180px;height:180px;border-radius:50%;margin:1rem auto;display:grid;place-items:center;text-align:center;background:conic-gradient(#0078d4 calc(var(--score)*1%),rgba(15,23,42,.08) 0);box-shadow:inset 0 0 0 18px #fff,0 18px 45px rgba(15,23,42,.14)}.water-score-ring strong{font-size:3rem;line-height:1}.water-score-ring span{display:block;font-size:.78rem;font-weight:800;color:#667085;text-transform:uppercase;letter-spacing:.08em}.water-pulse-strip{display:flex;gap:.8rem;align-items:center;padding:.9rem;border-radius:18px;background:rgba(0,120,212,.08);border:1px solid rgba(0,120,212,.12)}.water-pulse-dot{width:18px;height:18px;border-radius:50%;background:#0078d4;box-shadow:0 0 0 0 rgba(0,120,212,.6);animation:waterPulse 1.7s ease-out infinite}.water-filter-rail{position:sticky;top:1rem;border-radius:24px;background:#fff;border:1px solid rgba(15,23,42,.08);box-shadow:0 18px 45px rgba(15,23,42,.08);overflow:hidden}.water-filter-toggle{width:100%;border:0;background:#0f172a;color:#fff;font-weight:800;padding:.85rem 1rem}.water-filter-content{display:grid;gap:.65rem;padding:1rem}.water-filter-content h3{margin:0}.water-filter-content label{font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;color:#667085;font-weight:800;margin-top:.35rem}.water-filter-rail.collapsed .water-filter-content{display:none}.water-filter-rail.collapsed{max-width:120px}.water-attention-list,.water-intel-list,.water-report-list{display:grid;gap:.75rem}.water-attention-card,.water-intel-card,.water-report-card{padding:.9rem;border-radius:18px;border:1px solid rgba(15,23,42,.08);background:linear-gradient(135deg,#fff,rgba(248,250,252,.92))}.water-attention-card strong,.water-intel-card strong{display:block;color:#101828}.water-attention-card p,.water-intel-card p,.water-report-card p{margin:.25rem 0;color:#667085}.water-attention-card a{font-weight:800}.water-attention-card.critical,.water-intel-card.critical{border-color:rgba(180,35,24,.24);background:rgba(254,243,242,.8)}.water-attention-card.high,.water-intel-card.high{border-color:rgba(220,104,3,.24);background:rgba(255,250,235,.8)}.water-attention-card.moderate,.water-intel-card.moderate{border-color:rgba(247,144,9,.24);background:rgba(255,250,235,.55)}.water-attention-card.low,.water-intel-card.low{border-color:rgba(18,183,106,.22);background:rgba(236,253,243,.7)}.water-intel-meta{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.45rem}.water-intel-meta span{border-radius:999px;background:rgba(15,23,42,.06);padding:.25rem .55rem;font-size:.78rem;font-weight:800;color:#475467}.water-site-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:.8rem}.water-site-card{padding:1rem;border-radius:20px;border:1px solid rgba(15,23,42,.08);background:linear-gradient(135deg,#fff,rgba(0,120,212,.05))}.water-site-card h4{margin:0 0 .35rem}.water-site-card .water-site-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem;margin-top:.7rem}.water-site-card .water-site-metrics div,.water-value-grid div{border-radius:16px;background:rgba(15,23,42,.04);padding:.65rem}.water-site-card span,.water-value-grid span{display:block;color:#667085;font-size:.78rem}.water-site-card strong,.water-value-grid strong{font-size:1.05rem}.water-value-grid{display:grid;gap:.7rem;margin-bottom:.8rem}.water-report-card{display:block;text-decoration:none;color:inherit}.water-report-card small{display:inline-block;margin-top:.35rem;font-weight:800;color:#0078d4}.water-engineer-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1rem;align-items:center}.water-engineer-list{display:grid;gap:.8rem}.water-engineer-card{border:1px solid rgba(15,23,42,.08);border-radius:20px;padding:1rem;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.06)}.water-engineer-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}@keyframes waterPulse{70%{box-shadow:0 0 0 16px rgba(0,120,212,0)}100%{box-shadow:0 0 0 0 rgba(0,120,212,0)}}@keyframes waterRadar{to{transform:rotate(360deg)}}@media(max-width:1100px){.water-command-shell,.water-command-main{grid-template-columns:1fr}.water-filter-rail{position:relative;top:auto}}@media(max-width:720px){.water-command-main{display:block}.water-command-main>.card{margin-bottom:1rem}.water-score-ring{width:150px;height:150px}.water-score-ring strong{font-size:2.4rem}}

/* Asset Management */
.asset-hero,
.asset-detail-hero {
    background: radial-gradient(circle at top right, rgba(20,184,166,.22), transparent 32%), linear-gradient(135deg, rgba(2,6,23,.98), rgba(15,23,42,.92));
    color: #fff;
    border: 0;
}

.asset-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, .75fr);
    gap: 1.25rem;
    align-items: start;
}

.asset-register-card,
.asset-add-card {
    min-width: 0;
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.asset-filter-bar {
    display: flex;
    gap: .65rem;
    align-items: center;
    flex-wrap: wrap;
}

.asset-filter-bar input {
    min-width: 280px;
}

.asset-table-wrap {
    overflow-x: auto;
}

.asset-table td strong,
.asset-table td span {
    display: block;
}

.asset-code {
    margin-top: .2rem;
}

.small-button {
    padding: .45rem .75rem;
    min-height: auto;
}

.danger-zone {
    border-color: rgba(220,38,38,.25);
    background: rgba(254,242,242,.75);
}

@media (max-width: 1180px) {
    .asset-workbench {
        grid-template-columns: 1fr;
    }

    .section-heading-row {
        display: block;
    }

    .asset-filter-bar {
        margin-top: 1rem;
    }
}

/* Asset Management v2 command centre */
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.asset-command-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.25rem;
    align-items: stretch;
    padding: 2rem;
    margin-bottom: 1.25rem;
    border-radius: 30px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 15%, rgba(59, 130, 246, .38), transparent 28%),
        radial-gradient(circle at 86% 28%, rgba(20, 184, 166, .38), transparent 30%),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #164e63 100%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}

.asset-command-hero:before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(90deg, rgba(0,0,0,.9), transparent 85%);
    pointer-events: none;
}

.asset-command-hero > * { position: relative; }

.asset-hero-copy h2 {
    margin: .3rem 0 .65rem;
    max-width: 780px;
    font-size: clamp(2.15rem, 4vw, 4rem);
    line-height: .98;
    letter-spacing: -.055em;
}

.asset-hero-copy p {
    max-width: 820px;
    margin: 0;
    color: rgba(226, 232, 240, .86);
    font-size: 1.04rem;
}

.asset-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.35rem;
}

.asset-command-hero .button {
    border-radius: 999px;
    min-height: 44px;
}

.asset-command-hero .button.ghost {
    color: #dbeafe;
    border-color: rgba(219, 234, 254, .42);
    background: rgba(255,255,255,.08);
}

.asset-hero-panel {
    display: grid;
    align-content: center;
    gap: .55rem;
    padding: 1.25rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 26px;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.13);
}

.asset-hero-panel > span,
.asset-hero-panel > small {
    color: rgba(226, 232, 240, .8);
    font-weight: 700;
}

.asset-hero-panel > strong {
    display: block;
    font-size: 4.4rem;
    line-height: .9;
    letter-spacing: -.08em;
}

.asset-hero-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .55rem;
    margin-top: .7rem;
}

.asset-hero-mini-grid div {
    border-radius: 18px;
    padding: .75rem;
    background: rgba(255,255,255,.09);
}

.asset-hero-mini-grid b,
.asset-hero-mini-grid span {
    display: block;
}

.asset-hero-mini-grid b {
    font-size: 1.25rem;
}

.asset-hero-mini-grid span {
    color: rgba(226, 232, 240, .78);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.asset-metric-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.asset-metric-card {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    padding: 1.1rem;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,250,252,.9));
    box-shadow: 0 15px 38px rgba(15, 23, 42, .07);
}

.asset-metric-card:after {
    content: "";
    position: absolute;
    right: -26px;
    top: -26px;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: rgba(0, 94, 184, .09);
}

.asset-metric-card.warning:after { background: rgba(245, 158, 11, .16); }
.asset-metric-card.fault:after { background: rgba(239, 68, 68, .12); }
.asset-metric-card.value:after { background: rgba(16, 185, 129, .14); }
.asset-metric-card span { color: #64748b; font-weight: 800; }
.asset-metric-card strong { color: #0f172a; font-size: 2.25rem; letter-spacing: -.045em; }
.asset-metric-card small { color: #64748b; font-weight: 700; }

.asset-command-layout {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.asset-intelligence-rail {
    position: sticky;
    top: 1rem;
    display: grid;
    gap: 1rem;
}

.asset-rail-card {
    padding: 1.1rem;
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .24);
    box-shadow: 0 14px 35px rgba(15, 23, 42, .07);
}

.asset-rail-card h3 {
    margin: .25rem 0;
    font-size: 1.25rem;
}

.asset-rail-card-dark {
    color: #fff;
    border: 0;
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, .35), transparent 34%),
        linear-gradient(135deg, #0f172a, #1e3a8a);
}

.asset-rail-card-dark h3 {
    font-size: 3.2rem;
    line-height: .9;
    letter-spacing: -.06em;
}

.asset-rail-card-dark p { color: rgba(226, 232, 240, .85); margin: 0; }
.asset-rail-card-dark .eyebrow { color: rgba(226, 232, 240, .72); }

.section-heading-row.compact { margin-bottom: .65rem; }

.asset-site-list,
.asset-attention-list {
    display: grid;
    gap: .65rem;
}

.asset-site-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    padding: .72rem .78rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .18);
}

.asset-site-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #334155;
    font-weight: 800;
}

.asset-site-row strong {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
}

.asset-attention-item {
    display: block;
    padding: .85rem;
    border-radius: 18px;
    color: inherit;
    background: linear-gradient(135deg, #fff7ed, #fff);
    border: 1px solid rgba(251, 146, 60, .22);
}

.asset-attention-item:hover { text-decoration: none; transform: translateY(-1px); }
.asset-attention-item strong,
.asset-attention-item span { display: block; }
.asset-attention-item strong { color: #0f172a; }
.asset-attention-item span { color: #64748b; font-size: .88rem; margin-top: .2rem; }

.asset-main-workspace { min-width: 0; }
.asset-register-card,
.asset-add-card { border: 1px solid rgba(148, 163, 184, .22); }

.asset-register-heading {
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, .18);
}

.asset-filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 170px auto;
    gap: .65rem;
    align-items: end;
    min-width: min(620px, 100%);
}

.asset-filter-bar input,
.asset-filter-bar select { margin-top: 0; }

.asset-card-list {
    display: grid;
    gap: .8rem;
}

.asset-record-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: .9rem;
    align-items: center;
    padding: 1rem;
    border-radius: 22px;
    color: inherit;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid rgba(148, 163, 184, .22);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.asset-record-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: rgba(0, 94, 184, .28);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .08);
}

.asset-record-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #fff;
    font-weight: 900;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #005eb8, #14b8a6);
}

.asset-record-title-row {
    display: flex;
    gap: .85rem;
    justify-content: space-between;
    align-items: flex-start;
}

.asset-record-title-row strong,
.asset-record-title-row span { display: block; }
.asset-record-title-row strong { color: #0f172a; font-size: 1.02rem; }
.asset-record-title-row span { color: #64748b; margin-top: .18rem; }

.asset-status-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: .35rem .65rem;
    border-radius: 999px;
    font-size: .78rem;
    font-style: normal;
    font-weight: 900;
    color: #075985;
    background: #e0f2fe;
}

.asset-status-pill.moderate { color: #92400e; background: #fef3c7; }
.asset-status-pill.high { color: #9a3412; background: #ffedd5; }
.asset-status-pill.critical { color: #991b1b; background: #fee2e2; }
.asset-status-pill.archived { color: #475569; background: #e2e8f0; }

.asset-record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .65rem;
    margin-top: .7rem;
}

.asset-record-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .25rem .55rem;
    border-radius: 999px;
    color: #475569;
    background: rgba(15, 23, 42, .045);
    font-size: .83rem;
    font-weight: 750;
}

.asset-empty-state {
    padding: 2rem;
    border: 1px dashed rgba(0, 94, 184, .3);
    border-radius: 22px;
    text-align: center;
    background: #f8fafc;
}

.asset-empty-state strong { color: #0f172a; font-size: 1.15rem; }
.asset-empty-state p { max-width: 620px; margin: .4rem auto 0; }

.asset-form-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.asset-form-badge {
    padding: .45rem .7rem;
    border-radius: 999px;
    color: #065f46;
    background: #d1fae5;
    font-weight: 900;
    white-space: nowrap;
}

.asset-form-section {
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: linear-gradient(135deg, #f8fafc, #fff);
}

.asset-form-section + .asset-form-section { margin-top: 1rem; }
.asset-form-section h4 { margin: 0 0 .85rem; color: #0f172a; }
.asset-form-section label { color: #0f172a; font-size: .92rem; }
.asset-form-section input,
.asset-form-section select,
.asset-form-section textarea {
    border-color: rgba(148, 163, 184, .38);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03);
}

.asset-save-button {
    width: 100%;
    min-height: 48px;
    margin-top: 1rem;
    border-radius: 18px;
}

@media (max-width: 1280px) {
    .asset-metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .asset-command-layout { grid-template-columns: 1fr; }
    .asset-intelligence-rail { position: relative; top: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .asset-command-hero { grid-template-columns: 1fr; padding: 1.4rem; }
    .asset-intelligence-rail { grid-template-columns: 1fr; }
    .asset-filter-bar { grid-template-columns: 1fr; min-width: 0; }
    .asset-register-heading,
    .asset-record-title-row,
    .asset-form-header { display: block; }
    .asset-record-card { grid-template-columns: 44px minmax(0, 1fr); }
    .asset-record-icon { width: 44px; height: 44px; border-radius: 15px; }
    .asset-status-pill { margin-top: .45rem; }
    .asset-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .asset-metric-strip { grid-template-columns: 1fr; }
    .asset-hero-mini-grid { grid-template-columns: 1fr; }
    .asset-record-card { grid-template-columns: 1fr; }
}

.table-warning-row {
    background: #fff7ed;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-pill-ok {
    background: #dcfce7;
    color: #166534;
}

.status-pill-warning {
    background: #ffedd5;
    color: #9a3412;
}

.water-version-panel .table td,
.water-version-panel .table th {
    vertical-align: middle;
}

.version-inline-form {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
}

.compact-version-input {
    max-width: 120px;
    min-height: 2rem;
    padding: .35rem .55rem;
}

/* Enterprise System Health & Readiness Centre */
.health-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, .22);
    background:
        radial-gradient(circle at 12% 10%, rgba(14, 165, 233, .18), transparent 34%),
        radial-gradient(circle at 86% 20%, rgba(16, 185, 129, .16), transparent 34%),
        linear-gradient(135deg, #ffffff, #f8fafc 60%, #eef6ff);
}

.health-hero.health-critical {
    background:
        radial-gradient(circle at 12% 10%, rgba(239, 68, 68, .18), transparent 34%),
        linear-gradient(135deg, #fff, #fff7f7 60%, #fef2f2);
}

.health-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.health-pill,
.status-dot {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .06);
    color: #334155;
    font-size: .85rem;
    font-weight: 800;
}

.readiness-dial {
    min-width: 190px;
    min-height: 190px;
    border-radius: 999px;
    display: grid;
    place-content: center;
    text-align: center;
    background: conic-gradient(from 180deg, rgba(14, 165, 233, .95), rgba(16, 185, 129, .9), rgba(14, 165, 233, .25));
    box-shadow: 0 24px 60px rgba(15, 23, 42, .14);
    color: #fff;
}

.readiness-dial span {
    font-size: 3rem;
    line-height: 1;
    font-weight: 950;
}

.readiness-dial small,
.readiness-dial strong {
    display: block;
    color: rgba(255, 255, 255, .92);
}

.health-grid-large {
    align-items: stretch;
    margin-top: 1.2rem;
}

.health-panel {
    overflow: hidden;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-title-row h3 { margin-bottom: .25rem; }
.card-title-row p { margin: 0; color: #64748b; }
.card-title-row a { font-weight: 900; white-space: nowrap; }

.health-solution-list,
.attention-list,
.roadmap-list {
    display: grid;
    gap: .85rem;
}

.health-solution-row,
.attention-item,
.roadmap-item,
.insight-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 22px;
    padding: 1rem;
    background: linear-gradient(135deg, #fff, #f8fafc);
}

.health-solution-row ul {
    margin: .55rem 0 0;
    padding-left: 1.1rem;
    color: #475569;
}

.health-row-heading {
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
    align-items: center;
}

.health-row-heading strong { color: #0f172a; }
.health-row-heading span,
.roadmap-item > span {
    border-radius: 999px;
    padding: .25rem .55rem;
    background: rgba(15, 23, 42, .06);
    color: #334155;
    font-size: .78rem;
    font-weight: 900;
}

.health-row-sub,
.roadmap-item small {
    margin-top: .25rem;
    color: #64748b;
    font-size: .9rem;
}

.attention-item p,
.roadmap-item p,
.insight-card span {
    margin: .45rem 0 0;
    color: #475569;
}

.health-good { border-color: rgba(22, 163, 74, .25) !important; background: linear-gradient(135deg, #fff, #f0fdf4) !important; }
.health-warning { border-color: rgba(245, 158, 11, .28) !important; background: linear-gradient(135deg, #fff, #fffbeb) !important; }
.health-critical { border-color: rgba(239, 68, 68, .3) !important; background: linear-gradient(135deg, #fff, #fef2f2) !important; }
.health-muted { border-color: rgba(148, 163, 184, .25) !important; background: linear-gradient(135deg, #fff, #f8fafc) !important; }

.status-dot.health-good { color: #166534; background: #dcfce7 !important; }
.status-dot.health-warning { color: #92400e; background: #fef3c7 !important; }
.status-dot.health-critical { color: #991b1b; background: #fee2e2 !important; }
.status-dot.health-muted { color: #475569; background: #e2e8f0 !important; }

.health-table-wrap {
    overflow-x: auto;
}

.health-table th,
.health-table td {
    vertical-align: top;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.insight-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform .18s ease, box-shadow .18s ease;
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .11);
}

.health-kpis { margin-top: 1.2rem; }

@media (max-width: 1100px) {
    .health-hero { display: block; }
    .readiness-dial { margin-top: 1.25rem; }
    .insight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .health-solution-row,
    .attention-item,
    .roadmap-item,
    .card-title-row { display: block; }
    .health-solution-row .button,
    .attention-item .button { margin-top: .8rem; }
    .readiness-dial { min-width: 150px; min-height: 150px; }
}

/* Release & Version Centre */
.release-kpis { margin-bottom: 1.2rem; }

.release-summary-list {
    display: grid;
    gap: .75rem;
    margin: 0;
}

.release-summary-list > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem .85rem;
    border-radius: 16px;
    background: rgba(248, 250, 252, .9);
    border: 1px solid rgba(148, 163, 184, .18);
}

.release-summary-list dt {
    color: #64748b;
    font-weight: 800;
}

.release-summary-list dd {
    margin: 0;
    color: #0f172a;
    font-weight: 950;
    text-align: right;
}

.release-notes-form {
    display: grid;
    gap: .85rem;
}

.release-notes-form label {
    display: grid;
    gap: .35rem;
    color: #334155;
    font-weight: 900;
}

.release-notes-form textarea {
    width: 100%;
    min-height: 5rem;
    resize: vertical;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, .35);
    padding: .8rem .9rem;
    color: #0f172a;
    background: #fff;
}

.release-device-table {
    max-height: 560px;
}

/* Executive Estate Command Centre */
.command-hero {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: stretch;
    padding: 1.5rem;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, .22);
    background: linear-gradient(135deg, #0f172a, #1e3a8a 54%, #0f766e);
    color: #fff;
    box-shadow: 0 22px 70px rgba(15, 23, 42, .22);
    margin: 1rem 0 1.2rem;
}

.command-hero h1 {
    margin: .25rem 0 .55rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
    max-width: 900px;
}

.command-hero p {
    margin: 0;
    max-width: 900px;
    color: rgba(255,255,255,.82);
    font-size: 1.04rem;
}

.command-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}

.command-hero-meta span {
    padding: .45rem .75rem;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    color: rgba(255,255,255,.9);
    font-weight: 800;
}

.command-score-card {
    min-width: 210px;
    border-radius: 28px;
    padding: 1.15rem;
    display: grid;
    place-items: center;
    text-align: center;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(12px);
}

.command-score-card span,
.command-score-card em {
    color: rgba(255,255,255,.82);
    font-style: normal;
    font-weight: 900;
}

.command-score-card strong {
    font-size: 4.5rem;
    line-height: 1;
    letter-spacing: -.08em;
}

.command-grid {
    display: grid;
    gap: 1rem;
}

.command-grid--metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 1.2rem;
}

.command-metric-card,
.command-solution-card,
.command-action {
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .07);
}

.command-metric-card {
    padding: 1rem;
    display: grid;
    gap: .45rem;
}

.command-metric-card span,
.command-solution-metrics span,
.command-value-grid span {
    color: #64748b;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 950;
}

.command-metric-card strong {
    color: #0f172a;
    font-size: 2rem;
    line-height: 1;
}

.command-metric-card p,
.command-action p,
.command-solution-metrics small,
.command-value-grid p,
.command-timeline-item p,
.command-attention-item p {
    margin: 0;
    color: #64748b;
}

.command-metric-card a,
.command-action a,
.command-timeline-item a,
.command-disabled-list a {
    color: var(--nhs-accent);
    font-weight: 950;
    text-decoration: none;
}

.command-two-column {
    display: grid;
    grid-template-columns: 1.35fr .9fr;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.command-panel {
    padding: 1.1rem;
}

.command-panel-header,
.command-solution-head,
.command-action,
.command-attention-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.command-panel-header h2,
.command-attention-item h3,
.command-action h3,
.command-timeline-item h3,
.command-solution-head h3 {
    margin: .15rem 0 .25rem;
}

.command-money {
    color: #0f172a;
    font-size: 2rem;
}

.command-attention-list,
.command-actions-list,
.command-timeline,
.command-disabled-list {
    display: grid;
    gap: .8rem;
}

.command-attention-item {
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: linear-gradient(135deg, #fff, #f8fafc);
}

.command-attention-item span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.command-severity--critical,
.command-severity--high { border-left: 5px solid #ef4444; }
.command-severity--moderate { border-left: 5px solid #f59e0b; }
.command-severity--low { border-left: 5px solid #22c55e; }

.command-value-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    margin-bottom: 1rem;
}

.command-value-grid > div {
    padding: 1rem;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .18);
}

.command-value-grid strong {
    display: block;
    margin: .35rem 0;
    color: #0f172a;
    font-size: 1.75rem;
}

.command-action {
    padding: .85rem;
}

.command-solution-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.command-solution-card {
    padding: 1rem;
}

.command-solution-head img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 18px;
    background: #f8fafc;
    padding: .45rem;
}

.command-solution-head > strong {
    font-size: 2rem;
    color: #0f172a;
}

.command-solution-head span,
.command-solution-status {
    color: #64748b;
    font-weight: 850;
}

.command-solution-status {
    margin: .7rem 0;
}

.command-solution-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin: .8rem 0 1rem;
}

.command-solution-metrics > div {
    padding: .75rem;
    border-radius: 16px;
    background: #f8fafc;
}

.command-solution-metrics strong {
    display: block;
    margin: .25rem 0;
    color: #0f172a;
    font-size: 1.25rem;
}

.command-timeline-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .8rem;
    padding: .8rem;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .18);
}

.command-timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--nhs-accent);
    margin-top: .35rem;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, .12);
}

.command-timeline-item span {
    color: #64748b;
    font-size: .82rem;
    font-weight: 900;
}

.command-disabled-list > div {
    display: grid;
    gap: .25rem;
    padding: .85rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: #f8fafc;
}

.command-disabled-list span {
    color: #64748b;
}

.command-card--good { border-color: rgba(22, 163, 74, .22); background: linear-gradient(135deg, #fff, #f0fdf4); }
.command-card--warning { border-color: rgba(245, 158, 11, .26); background: linear-gradient(135deg, #fff, #fffbeb); }
.command-card--critical { border-color: rgba(239, 68, 68, .28); background: linear-gradient(135deg, #fff, #fef2f2); }
.command-card--neutral { border-color: rgba(148, 163, 184, .22); background: linear-gradient(135deg, #fff, #f8fafc); }

@media (max-width: 1200px) {
    .command-grid--metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .command-two-column { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .command-hero,
    .command-panel-header,
    .command-attention-item,
    .command-action { display: block; }
    .command-score-card { margin-top: 1rem; }
    .command-grid--metrics,
    .command-solution-grid,
    .command-value-grid { grid-template-columns: 1fr; }
    .command-solution-metrics { grid-template-columns: 1fr; }
}

.command-home-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.2rem 0;
    padding: 1.2rem;
    border-radius: 26px;
    background: linear-gradient(135deg, #0f172a, #1e3a8a 60%, #0f766e);
    color: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}
.command-home-card h3 { margin: .2rem 0 .35rem; font-size: 1.45rem; }
.command-home-card p { margin: 0; color: rgba(255,255,255,.82); max-width: 780px; }
@media (max-width: 820px) { .command-home-card { display: block; } .command-home-card .button { margin-top: 1rem; } }

/* Professional estate location administration */
.locations-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 24px;
    padding: 30px;
    border-radius: 32px;
    color: white;
    background: radial-gradient(circle at 12% 22%, rgba(46, 196, 182, .28), transparent 34%), linear-gradient(135deg, #06283d 0%, #0f4f8a 55%, #005eb8 100%);
    box-shadow: 0 22px 55px rgba(8, 48, 90, .18);
}
.locations-hero h2 { margin: 8px 0; font-size: clamp(2.1rem, 4vw, 3.4rem); letter-spacing: -.05em; }
.locations-hero p { max-width: 820px; margin: 0; color: rgba(255,255,255,.84); font-size: 1.04rem; line-height: 1.6; }
.locations-hero .eyebrow { color: rgba(255,255,255,.78); }
.locations-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.locations-hero-actions .button.ghost { color: white; border-color: rgba(255,255,255,.58); }
.locations-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.location-kpi-card { position: relative; overflow: hidden; min-height: 132px; padding: 20px; border-radius: 26px; border: 1px solid rgba(15, 23, 42, .08); background: linear-gradient(180deg, #fff 0%, #f8fbff 100%); box-shadow: 0 12px 36px rgba(8,48,90,.06); }
.location-kpi-card:after { content: ""; position: absolute; right: -46px; bottom: -58px; width: 130px; height: 130px; border-radius: 999px; background: rgba(0, 94, 184, .08); }
.location-kpi-card span, .location-kpi-card small { display: block; color: #64748b; }
.location-kpi-card span { font-weight: 800; font-size: .86rem; }
.location-kpi-card strong { display: block; margin: 8px 0 4px; font-size: 2.25rem; letter-spacing: -.04em; color: #0f172a; }
.location-kpi-card.muted-kpi:after { background: rgba(100,116,139,.1); }
.locations-toolbar { padding: 18px; }
.locations-search-form { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto auto; align-items: end; gap: 14px; }
.locations-archive-toggle { padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: #f8fbff; }
.locations-admin-grid { display: grid; grid-template-columns: minmax(310px, .36fr) minmax(0, .64fr); gap: 20px; align-items: start; }
.locations-add-panel { position: sticky; top: 18px; }
.locations-panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.locations-panel-header h3 { margin: 4px 0; }
.location-add-section { border: 1px solid var(--line); border-radius: 20px; background: #fbfdff; margin-bottom: 12px; overflow: hidden; }
.location-add-section summary { cursor: pointer; padding: 16px 18px; font-weight: 900; color: #16324f; background: linear-gradient(180deg, #fff, #f7fbff); }
.location-add-section form { padding: 0 18px 18px; }
.locations-bulk-box { margin-top: 20px; padding: 18px; border-radius: 22px; background: #f6faff; border: 1px dashed #a8bed3; }
.locations-bulk-box h4 { margin: 5px 0 6px; }
.locations-tree-card { min-height: 620px; }
.locations-tree-list { display: grid; gap: 16px; }
.location-node { border: 1px solid rgba(15,23,42,.08); border-radius: 24px; background: #fff; overflow: hidden; }
.location-node summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); }
.location-node summary::-webkit-details-marker { display: none; }
.location-node summary:before { content: "â–¾"; color: #64748b; font-weight: 900; transition: transform .15s ease; }
.location-node:not([open]) summary:before { transform: rotate(-90deg); }
.location-node-title { display: inline-flex; align-items: center; gap: 10px; min-width: 190px; }
.location-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 13px; background: #e9f2fb; }
.location-node-meta { margin-left: auto; color: #64748b; font-size: .9rem; }
.location-node-body { padding: 18px; border-top: 1px solid var(--line); }
.location-site-node { box-shadow: 0 12px 32px rgba(8,48,90,.055); }
.location-block-node { margin-top: 14px; border-radius: 20px; background: #fbfdff; }
.location-inline-edit { display: grid; grid-template-columns: minmax(180px, .9fr) minmax(110px, .45fr) minmax(180px, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 10px; }
.location-edit-notes { min-width: 0; }
.location-node-actions { display: flex; justify-content: flex-end; gap: 12px; margin: 6px 0 14px; }
.location-child-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.location-child-grid section { padding: 16px; border-radius: 20px; background: #f8fbff; border: 1px solid var(--line); }
.location-child-grid h4 { margin: 0 0 10px; }
.location-leaf { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid #dde8f4; }
.location-leaf:first-of-type { border-top: 0; }
.location-leaf-edit { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(120px, 1fr) auto; gap: 10px; align-items: center; }
.location-leaf input { margin-top: 0; }
.location-leaf.is-archived { opacity: .72; }
.status-pill.archived { background: #e2e8f0; color: #475569; }
.danger-link { color: #b42318; font-weight: 800; }
.locations-empty-state { display: grid; gap: 10px; place-items: center; text-align: center; min-height: 320px; padding: 28px; border-radius: 24px; background: #f8fbff; border: 1px dashed #b8c7d6; }
@media (max-width: 1280px) {
    .locations-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .locations-admin-grid { grid-template-columns: 1fr; }
    .locations-add-panel { position: static; }
}
@media (max-width: 900px) {
    .locations-hero { align-items: flex-start; flex-direction: column; padding: 24px; }
    .locations-kpis { grid-template-columns: 1fr; }
    .locations-search-form, .location-inline-edit, .location-leaf-edit, .location-child-grid { grid-template-columns: 1fr; }
    .location-node summary { align-items: flex-start; flex-direction: column; }
    .location-node-meta { margin-left: 0; }
}

.locations-readiness-card,
.locations-audit-card {
    margin: 0 0 20px;
    padding: 20px;
}

.location-issue-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.location-issue {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, .24);
    background: #f8fbff;
}

.location-issue strong {
    color: #0f172a;
}

.location-issue span {
    color: #64748b;
    line-height: 1.45;
}

.location-issue-warning {
    background: linear-gradient(135deg, #fff, #fff7ed);
    border-color: rgba(245, 158, 11, .28);
}

.location-issue-info {
    background: linear-gradient(135deg, #fff, #eff6ff);
    border-color: rgba(37, 99, 235, .22);
}

.locations-bulk-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 8px 0 12px;
}

.locations-audit-list {
    display: grid;
    gap: 10px;
}

.locations-audit-list article {
    display: grid;
    gap: 4px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f8fbff;
}

.locations-audit-list span,
.locations-audit-list small {
    color: #64748b;
}

@media (max-width: 1100px) {
    .location-issue-list {
        grid-template-columns: 1fr;
    }
}

/* Users and access polish */
.users-admin-grid {
    align-items: stretch;
}

.users-add-card,
.users-license-card {
    min-height: 100%;
}

.users-license-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.users-license-metrics .metric-inline {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.9));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.mini-warning {
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: rgba(255, 251, 235, 0.95);
    color: #92400e;
    border-radius: 16px;
    padding: 0.85rem 1rem;
    font-weight: 700;
}

.users-empty-state {
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: 22px;
    padding: 1.25rem;
    background: rgba(248, 250, 252, 0.75);
    color: #475569;
}

.users-empty-state strong {
    display: block;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.danger-button {
    color: #991b1b !important;
    border-color: rgba(185, 28, 28, 0.22) !important;
    background: rgba(254, 242, 242, 0.7) !important;
}

.danger-button:hover {
    background: rgba(254, 226, 226, 0.95) !important;
}

/* Ticket queue polish */
.queue-kpi-grid { grid-template-columns: repeat(6, minmax(0,1fr)); }
.queue-kpi-warning { border-color:#f4c987; background:linear-gradient(180deg,#fffaf2 0%,#ffffff 100%); }
.queue-kpi-warning strong { color:#9a4d00; }
.queue-filter-header .hero-actions { flex-wrap:wrap; }
.queue-table-header p { max-width:720px; }
@media (max-width: 1500px) { .queue-kpi-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 900px) { .queue-kpi-grid { grid-template-columns: 1fr; } }

/* Asset register filter/export polish */
.asset-filter-bar.enhanced {
    grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(140px, .8fr)) auto auto auto;
    width: 100%;
    min-width: min(980px, 100%);
}

.asset-filter-bar.enhanced .button {
    white-space: nowrap;
}

@media (max-width: 1380px) {
    .asset-filter-bar.enhanced {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .asset-filter-bar.enhanced {
        grid-template-columns: 1fr;
    }
}

/* Survey template professional admin polish */
.template-hero {
    align-items: flex-start;
    gap: 1rem;
}

.template-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.template-summary-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1.25rem;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.template-summary-card span,
.template-summary-card small {
    color: #667085;
    font-weight: 700;
}

.template-summary-card strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    margin: .35rem 0;
    color: #101828;
}

.template-summary-card.good {
    border-color: rgba(18, 183, 106, .28);
    background: linear-gradient(135deg, #fff, #ecfdf3);
}

.template-summary-card.warning {
    border-color: rgba(247, 144, 9, .35);
    background: linear-gradient(135deg, #fff, #fffaeb);
}

.template-readiness-panel {
    margin-bottom: 1rem;
}

.template-readiness-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.template-readiness-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .75rem;
    padding: .85rem;
    border-radius: 1rem;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .08);
}

.template-readiness-item > span {
    align-self: flex-start;
    border-radius: 999px;
    padding: .25rem .55rem;
    font-size: .74rem;
    font-weight: 800;
    background: #e4e7ec;
    color: #344054;
}

.template-readiness-item p {
    margin: .2rem 0 0;
    color: #667085;
}

.template-readiness-item.high > span {
    background: #fee4e2;
    color: #b42318;
}

.template-readiness-item.medium > span {
    background: #fef0c7;
    color: #b54708;
}

.template-readiness-item.low > span {
    background: #e0f2fe;
    color: #026aa2;
}

.template-readiness-item.good > span {
    background: #dcfae6;
    color: #067647;
}

.template-admin-grid {
    align-items: stretch;
}

.template-add-card {
    border-top: 4px solid #0078d4;
}

.template-section-card {
    border-left: 5px solid #0078d4;
    overflow: hidden;
}

.template-section-head {
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    margin-bottom: 1rem;
}

.professional-template-item {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1rem;
    padding: 1rem;
    margin-top: .85rem;
    background: linear-gradient(135deg, #fff, #f8fafc);
}

.template-empty-section {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 1px dashed rgba(15, 23, 42, .18);
    background: #f8fafc;
    color: #667085;
    border-radius: 1rem;
    padding: .85rem 1rem;
    margin-top: 1rem;
}

.template-save-bar {
    justify-content: space-between;
}

.validation-card {
    border-left: 5px solid #b42318;
}

.danger-soft {
    color: #b42318 !important;
    border-color: rgba(180, 35, 24, .24) !important;
    background: #fff !important;
}

.danger-soft:hover {
    background: #fee4e2 !important;
}

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

@media (max-width: 640px) {
    .template-summary-grid,
    .template-readiness-list {
        grid-template-columns: 1fr;
    }

    .template-empty-section,
    .template-save-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Release Centre polish */
.release-hero-actions .button.secondary {
    background: rgba(255,255,255,.16);
    border-color: rgba(255,255,255,.28);
    color: #fff;
    box-shadow: none;
}
.release-hero-actions .button.secondary:hover {
    background: rgba(255,255,255,.24);
    color: #fff;
}
.release-notes-form textarea {
    min-height: 96px;
    resize: vertical;
}
.release-summary-list dd {
    overflow-wrap: anywhere;
}
.release-device-table td:first-child small {
    overflow-wrap: anywhere;
}

/* Admin command centre polish */
.admin-command-header {
    align-items: center;
    gap: 1rem;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: flex-end;
}

.admin-hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.admin-hero-card {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(15, 23, 42, .08);
    background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,250,252,.92));
}

.admin-hero-card::after {
    content: "";
    position: absolute;
    right: -44px;
    bottom: -52px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(59, 130, 246, .08);
    pointer-events: none;
}

.admin-hero-card.readiness-critical::after { background: rgba(220, 38, 38, .10); }
.admin-hero-card.readiness-warning::after { background: rgba(245, 158, 11, .12); }
.admin-hero-card.readiness-good::after { background: rgba(22, 163, 74, .10); }

.hero-card-topline,
.section-title-row,
.module-pulse-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.hero-card-topline span,
.module-pulse-topline span,
.readiness-area {
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-card-topline strong {
    color: #0f172a;
    font-size: 1.35rem;
}

.readiness-score-ring {
    width: 120px;
    height: 120px;
    border-radius: 999px;
    display: grid;
    place-content: center;
    text-align: center;
    background: radial-gradient(circle, #fff 54%, transparent 56%), conic-gradient(#2563eb var(--score, 78%), #e2e8f0 0);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06);
    margin: .75rem 0;
}

.readiness-score-ring span {
    display: block;
    color: #0f172a;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1;
}

.readiness-score-ring small {
    display: block;
    max-width: 80px;
    color: #64748b;
    font-size: .72rem;
    line-height: 1.15;
    margin-top: .25rem;
}

.admin-metric-grid .metric-card small {
    display: block;
    margin-top: .35rem;
    color: #64748b;
    font-size: .78rem;
}

.command-centre-section {
    align-items: stretch;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .35rem .7rem;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-good { background: #dcfce7; color: #166534; }
.status-warning { background: #fef3c7; color: #92400e; }
.status-critical { background: #fee2e2; color: #991b1b; }

.readiness-list,
.priority-action-list {
    display: grid;
    gap: .75rem;
}

.readiness-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: .9rem;
    border: 1px solid #e2e8f0;
    border-left-width: 5px;
    border-radius: 18px;
    background: #fff;
}

.readiness-item strong {
    display: block;
    color: #0f172a;
    margin-top: .15rem;
}

.readiness-item p {
    color: #64748b;
    margin: .25rem 0 0;
    font-size: .9rem;
}

.readiness-item-critical { border-left-color: #dc2626; background: #fff7f7; }
.readiness-item-warning { border-left-color: #f59e0b; background: #fffbeb; }
.readiness-item-attention { border-left-color: #7c3aed; background: #f5f3ff; }
.readiness-item-info { border-left-color: #0284c7; background: #f0f9ff; }
.readiness-item-good { border-left-color: #16a34a; background: #f0fdf4; }

.button.subtle {
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.priority-action-card,
.module-pulse-card,
.admin-link-grid a {
    text-decoration: none;
}

.priority-action-card {
    display: grid;
    gap: .25rem;
    padding: .95rem;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff, #f8fafc);
    color: #0f172a;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.priority-action-card:hover,
.module-pulse-card:hover,
.admin-link-grid a:hover {
    transform: translateY(-1px);
    border-color: #bfdbfe;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.priority-action-card span {
    color: #2563eb;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.priority-action-card small {
    color: #64748b;
    line-height: 1.35;
}

.module-pulse-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .9rem;
}

.module-pulse-card {
    display: grid;
    gap: .65rem;
    min-height: 150px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
    color: #0f172a;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.module-pulse-card h4 {
    margin: 0;
    font-size: 1.05rem;
}

.module-pulse-card p {
    margin: 0;
    color: #64748b;
    font-size: .88rem;
}

.module-pulse-topline strong {
    border-radius: 999px;
    padding: .25rem .55rem;
    font-size: .72rem;
    background: #e2e8f0;
    color: #334155;
}

.module-pulse-healthy { border-top: 5px solid #16a34a; }
.module-pulse-attention { border-top: 5px solid #f59e0b; }
.module-pulse-critical { border-top: 5px solid #dc2626; }
.module-pulse-healthy .module-pulse-topline strong { background: #dcfce7; color: #166534; }
.module-pulse-attention .module-pulse-topline strong { background: #fef3c7; color: #92400e; }
.module-pulse-critical .module-pulse-topline strong { background: #fee2e2; color: #991b1b; }

.admin-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.admin-link-grid a {
    display: block;
    padding: .8rem .9rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .admin-hero-grid,
    .module-pulse-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .admin-hero-grid,
    .module-pulse-grid,
    .admin-link-grid {
        grid-template-columns: 1fr;
    }

    .readiness-item {
        grid-template-columns: 1fr;
    }

    .page-actions {
        justify-content: flex-start;
    }
}

/* Executive reporting pack polish */
.executive-score-grid .executive-score-card {
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.executive-score-grid .executive-score-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
    border-color: rgba(37, 99, 235, .22);
}

.executive-score-grid .executive-score-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(37,99,235,.65), rgba(14,165,233,.65));
}

.executive-score-grid .executive-score-card.health-critical::after { background: linear-gradient(90deg, #dc2626, #f97316); }
.executive-score-grid .executive-score-card.health-warning::after { background: linear-gradient(90deg, #f59e0b, #eab308); }
.executive-score-grid .executive-score-card.health-good::after { background: linear-gradient(90deg, #059669, #10b981); }
.executive-score-grid .executive-score-card.health-muted::after { background: linear-gradient(90deg, #64748b, #94a3b8); }

.executive-pack-panel,
.executive-action-plan-panel {
    margin-top: 1.25rem;
}

.executive-board-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.executive-board-card {
    border-radius: 22px;
    padding: 1rem;
    border: 1px solid rgba(15,23,42,.08);
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.92));
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.executive-board-card.health-critical { border-color: rgba(220, 38, 38, .24); background: linear-gradient(180deg, rgba(254,242,242,.96), rgba(255,255,255,.94)); }
.executive-board-card.health-warning { border-color: rgba(245, 158, 11, .28); background: linear-gradient(180deg, rgba(255,251,235,.96), rgba(255,255,255,.94)); }
.executive-board-card.health-good { border-color: rgba(5, 150, 105, .24); background: linear-gradient(180deg, rgba(236,253,245,.96), rgba(255,255,255,.94)); }
.executive-board-card.health-muted { border-color: rgba(100,116,139,.18); }

.executive-board-heading {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
    margin-bottom: .75rem;
}

.executive-board-heading h4 {
    margin: .15rem 0 0;
    font-size: 1.05rem;
}

.executive-board-card p {
    margin: 0 0 .75rem;
    color: #475569;
    line-height: 1.45;
}

.executive-board-card ul {
    margin: 0;
    padding-left: 1.1rem;
    color: #334155;
    display: grid;
    gap: .35rem;
}

.executive-action-table small {
    display: block;
    margin-top: .2rem;
    color: #64748b;
    max-width: 680px;
}

.priority-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    padding: .28rem .55rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: .78rem;
    letter-spacing: .03em;
}

.priority-p1 { background: #fee2e2; color: #991b1b; }
.priority-p2 { background: #fef3c7; color: #92400e; }
.priority-p3 { background: #dbeafe; color: #1d4ed8; }
.priority-p4 { background: #dcfce7; color: #166534; }

@media (max-width: 1180px) {
    .executive-board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .executive-board-grid { grid-template-columns: 1fr; }
    .executive-pack-panel .card-title-row,
    .executive-action-plan-panel .card-title-row { align-items: stretch; }
}

/* Ticket operations centre */
.queue-kpi-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.metric-unit {
    font-size: .58em;
    margin-left: .15rem;
    opacity: .72;
}

.queue-ops-table th:nth-child(2),
.queue-ops-table td:nth-child(2) {
    min-width: 240px;
}

.sla-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .01em;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #f8fafc;
    color: #334155;
    white-space: nowrap;
}

.sla-ok {
    background: #ecfdf5;
    border-color: rgba(16, 185, 129, .25);
    color: #047857;
}

.sla-warning {
    background: #fffbeb;
    border-color: rgba(245, 158, 11, .34);
    color: #92400e;
}

.sla-breached {
    background: #fef2f2;
    border-color: rgba(239, 68, 68, .28);
    color: #b91c1c;
}

.sla-closed {
    background: #f1f5f9;
    border-color: rgba(100, 116, 139, .24);
    color: #475569;
}

.ticket-work-header {
    align-items: stretch;
}

.ticket-work-pulse {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.ticket-pulse-card {
    background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(248,250,252,.88));
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 1.35rem;
    padding: 1rem;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
    display: grid;
    gap: .35rem;
}

.ticket-pulse-card span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ticket-pulse-card strong {
    font-size: 1.35rem;
    color: #0f172a;
}

.ticket-pulse-card small {
    color: #64748b;
    font-weight: 700;
}

.ticket-pulse-card.sla-breached {
    background: linear-gradient(135deg, #fff7f7, #fee2e2);
}

.ticket-pulse-card.sla-warning {
    background: linear-gradient(135deg, #fffbea, #fef3c7);
}

.ticket-pulse-card.sla-ok {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.ticket-quick-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ticket-quick-actions h3,
.ticket-quick-actions p {
    margin: 0;
}

.ticket-work-grid {
    align-items: start;
}

.ticket-history-card {
    margin-top: 1.25rem;
}

.callout.warning {
    background: #fffbeb;
    border: 1px solid rgba(245, 158, 11, .35);
    color: #92400e;
    border-radius: 1rem;
    padding: .85rem 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (max-width: 780px) {
    .ticket-quick-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ticket-quick-actions .hero-actions {
        width: 100%;
        justify-content: stretch;
    }

    .ticket-quick-actions form,
    .ticket-quick-actions button {
        width: 100%;
    }
}

/* Asset management operations pass */
.asset-ops-panel .readiness-list,
.asset-breakdown-list {
    display: grid;
    gap: .75rem;
}

.readiness-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: .9rem 1rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-left: 5px solid #94a3b8;
    border-radius: 1rem;
    background: rgba(248, 250, 252, .92);
}

.readiness-item strong,
.asset-breakdown-row strong {
    display: block;
    color: #0f172a;
}

.readiness-item p,
.asset-breakdown-row span,
.asset-breakdown-row small {
    margin: .15rem 0 0;
    color: #64748b;
}

.readiness-item.severity-critical,
.readiness-item.severity-high {
    border-left-color: #dc2626;
    background: linear-gradient(135deg, rgba(254, 242, 242, .96), rgba(255, 255, 255, .96));
}

.readiness-item.severity-moderate {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, rgba(255, 251, 235, .96), rgba(255, 255, 255, .96));
}

.readiness-item.severity-low {
    border-left-color: #16a34a;
    background: linear-gradient(135deg, rgba(240, 253, 244, .96), rgba(255, 255, 255, .96));
}

.asset-breakdown-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(248, 250, 252, .9);
}

.asset-breakdown-meta {
    text-align: right;
    min-width: 150px;
}

.asset-breakdown-meta span {
    display: block;
}

.compact-table-wrap {
    max-height: 470px;
    overflow: auto;
}

.compact-table td,
.compact-table th {
    padding: .7rem .75rem;
    vertical-align: top;
}

@media (max-width: 760px) {
    .readiness-item,
    .asset-breakdown-row {
        display: block;
    }

    .asset-breakdown-meta {
        text-align: left;
        margin-top: .4rem;
    }
}


/* Survey operations bigger pass */
.survey-ops-strip {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.survey-ops-score-card,
.survey-ops-mini-card {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1.4rem;
    background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,246,255,.9));
    box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
    padding: 1rem;
}

.survey-ops-score-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.survey-ops-score-card h3 {
    margin: .2rem 0 .25rem;
    color: #0f172a;
}

.survey-ops-score-card p {
    margin: 0;
    color: #64748b;
}

.survey-ops-score-card > strong {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: #0f3b63;
    color: #fff;
    font-size: 1.7rem;
    box-shadow: inset 0 0 0 6px rgba(255,255,255,.14);
}

.survey-ops-mini-card span {
    display: block;
    color: #64748b;
    font-size: .82rem;
    font-weight: 700;
}

.survey-ops-mini-card strong {
    display: block;
    margin-top: .35rem;
    color: #0f172a;
    font-size: 1.7rem;
}

.survey-ops-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.survey-readiness-list,
.survey-action-list {
    display: grid;
    gap: .8rem;
}

.survey-readiness-item,
.survey-action-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: .9rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(248, 250, 252, .92);
}

.survey-readiness-item {
    border-left: 5px solid #94a3b8;
}

.survey-readiness-item.high,
.survey-readiness-item.at-risk {
    border-left-color: #dc2626;
    background: linear-gradient(135deg, rgba(254, 242, 242, .96), rgba(255, 255, 255, .96));
}

.survey-readiness-item.moderate,
.survey-readiness-item.needs-attention {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, rgba(255, 251, 235, .96), rgba(255, 255, 255, .96));
}

.survey-readiness-item.good,
.status-badge.good {
    border-left-color: #16a34a;
    background: rgba(240, 253, 244, .96);
    color: #166534;
}

.survey-readiness-item strong,
.survey-action-item strong {
    color: #0f172a;
}

.survey-readiness-item p,
.survey-readiness-item span,
.survey-action-item p {
    margin: .2rem 0 0;
    color: #64748b;
}

.survey-readiness-item em {
    white-space: nowrap;
    font-style: normal;
    color: #334155;
    font-weight: 800;
    font-size: .78rem;
    text-transform: uppercase;
}

.survey-action-item {
    justify-content: flex-start;
    align-items: center;
}

.survey-action-item .status-badge {
    min-width: 92px;
    text-align: center;
}

.status-badge.high {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.moderate {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.routine {
    background: #e0f2fe;
    color: #075985;
}

.survey-priority-note {
    max-width: 320px;
    color: #64748b;
}

@media (max-width: 1100px) {
    .survey-ops-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .survey-ops-score-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .survey-ops-strip,
    .survey-ops-grid {
        grid-template-columns: 1fr;
    }

    .survey-readiness-item,
    .survey-action-item {
        display: block;
    }

    .survey-action-item .status-badge {
        display: inline-block;
        margin-bottom: .5rem;
    }
}

/* Water admin commissioning and import polish */
.water-admin-readiness-panel {
    overflow: hidden;
    position: relative;
}

.water-admin-readiness-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, #0ea5e9, #2563eb, #7c3aed);
}

.water-readiness-score {
    width: 94px;
    height: 94px;
    border-radius: 50%;
    display: grid;
    place-content: center;
    text-align: center;
    background:
        radial-gradient(circle at center, #fff 58%, transparent 59%),
        conic-gradient(#0ea5e9 calc(var(--score) * 1%), #e5e7eb 0);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08), 0 12px 30px rgba(15, 23, 42, .10);
}

.water-readiness-score strong {
    display: block;
    font-size: 1.85rem;
    line-height: 1;
    color: #0f172a;
}

.water-readiness-score span {
    font-size: .75rem;
    font-weight: 800;
    color: #64748b;
}

.water-admin-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin: 1rem 0;
}

.water-admin-metric-grid > div {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: .9rem 1rem;
    background: #f8fafc;
}

.water-admin-metric-grid span,
.water-value-grid span {
    display: block;
    color: #64748b;
    font-weight: 800;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.water-admin-metric-grid strong {
    display: block;
    margin-top: .2rem;
    font-size: 1.55rem;
    color: #0f172a;
}

.water-readiness-list {
    display: grid;
    gap: .75rem;
}

.water-readiness-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: .8rem;
    align-items: start;
    border: 1px solid #e5e7eb;
    border-left: 5px solid #0284c7;
    border-radius: 18px;
    padding: .95rem 1rem;
    background: #fff;
}

.water-readiness-item > span {
    display: inline-flex;
    justify-content: center;
    border-radius: 999px;
    padding: .25rem .65rem;
    background: #e0f2fe;
    color: #075985;
    font-weight: 900;
    font-size: .75rem;
}

.water-readiness-item strong {
    display: block;
    color: #0f172a;
}

.water-readiness-item p {
    margin: .2rem 0;
    color: #475467;
}

.water-readiness-item small {
    color: #64748b;
    font-weight: 700;
}

.water-readiness-item.severity-high {
    border-left-color: #dc2626;
    background: #fff7f7;
}

.water-readiness-item.severity-high > span {
    background: #fee2e2;
    color: #991b1b;
}

.water-readiness-item.severity-medium {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.water-readiness-item.severity-medium > span {
    background: #fef3c7;
    color: #92400e;
}

.water-readiness-item.severity-low {
    border-left-color: #0284c7;
    background: #f0f9ff;
}

.water-readiness-item.severity-good {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

.water-readiness-item.severity-good > span {
    background: #dcfce7;
    color: #166534;
}

.bulk-import-box {
    min-height: 190px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .88rem;
}

.water-checklist {
    display: grid;
    gap: .75rem;
}

.water-checklist > div {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: .75rem;
    align-items: center;
    padding: .85rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.water-checklist strong {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    background: #0ea5e9;
    color: #fff;
}

.water-checklist span {
    color: #475467;
    font-weight: 650;
}

@media (max-width: 900px) {
    .water-admin-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .water-readiness-item {
        grid-template-columns: 1fr;
    }
}

/* Integration Hub assurance pass */
.integration-export-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem 1.25rem;
}

.integration-export-bar p {
    margin: .25rem 0 0;
    color: var(--muted, #64748b);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: flex-end;
}

.integration-assurance-grid {
    margin-top: 1rem;
}

.assurance-list,
.playbook-list {
    display: grid;
    gap: .75rem;
}

.assurance-item,
.playbook-step {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    padding: .9rem 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.88));
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.assurance-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.assurance-item p,
.playbook-step p {
    margin: .25rem 0 0;
    color: var(--muted, #64748b);
}

.assurance-item > span {
    border-radius: 999px;
    padding: .28rem .65rem;
    font-size: .78rem;
    font-weight: 800;
    background: rgba(15, 23, 42, .06);
    white-space: nowrap;
}

.playbook-step {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .85rem;
}

.playbook-order {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    background: rgba(14, 165, 233, .12);
    color: #075985;
}

.integration-matrix-panel {
    margin-top: 1rem;
}

.integration-matrix-table td {
    vertical-align: top;
}

.health-good.assurance-item,
.health-good.playbook-step {
    border-color: rgba(34, 197, 94, .22);
}

.health-warning.assurance-item,
.health-warning.playbook-step {
    border-color: rgba(245, 158, 11, .28);
}

.health-critical.assurance-item,
.health-critical.playbook-step {
    border-color: rgba(239, 68, 68, .28);
}

@media (max-width: 900px) {
    .integration-export-bar,
    .assurance-item {
        align-items: stretch;
        flex-direction: column;
    }

    .button-row {
        justify-content: flex-start;
    }

    .playbook-step {
        grid-template-columns: auto 1fr;
    }

    .playbook-step .button {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

/* Settings & notification governance */
.settings-hero-header {
    align-items: flex-start;
    gap: 1rem;
}

.settings-export-actions {
    justify-content: flex-end;
}

.settings-governance-panel {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.settings-readiness-score,
.settings-area-card,
.settings-action-card,
.notification-placeholder-panel {
    border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255, 255, 255, .94);
    border-radius: 1.25rem;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.settings-readiness-score {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    position: relative;
    overflow: hidden;
}

.settings-readiness-score::after {
    content: "";
    position: absolute;
    inset: auto -2.5rem -2.5rem auto;
    width: 9rem;
    height: 9rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, .12);
}

.settings-readiness-score strong {
    font-size: clamp(2.7rem, 6vw, 4.5rem);
    line-height: .9;
    letter-spacing: -.08em;
    color: #0f172a;
}

.settings-readiness-score > span:last-of-type {
    font-weight: 900;
    color: #334155;
}

.settings-readiness-score p {
    margin: .35rem 0 0;
    color: #64748b;
    max-width: 24rem;
}

.settings-area-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .85rem;
}

.settings-area-card {
    padding: 1rem;
    border-left: 5px solid rgba(14, 165, 233, .45);
}

.settings-area-card span {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.settings-area-card strong {
    display: block;
    margin-top: .25rem;
    font-size: 1.05rem;
    color: #0f172a;
}

.settings-area-card p {
    margin: .35rem 0 0;
    color: #64748b;
    font-size: .9rem;
}

.settings-readiness-list {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, .98), rgba(255, 255, 255, .96));
}

.settings-action-list {
    display: grid;
    gap: .75rem;
}

.settings-action-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .85rem;
    padding: .9rem 1rem;
}

.settings-action-card p {
    margin: .2rem 0 0;
    color: #64748b;
}

.settings-action-meta {
    text-align: right;
    display: grid;
    gap: .15rem;
    color: #334155;
    font-weight: 800;
}

.settings-action-meta small {
    color: #64748b;
    font-weight: 700;
}

.template-actions {
    margin-top: .75rem;
}

.notification-placeholder-panel {
    margin-top: 1rem;
    padding: 1rem;
}

.placeholder-table code {
    display: inline-block;
    border-radius: .55rem;
    padding: .2rem .45rem;
    background: rgba(15, 23, 42, .06);
    color: #0f172a;
    font-weight: 800;
}

.settings-safe-edit-callout {
    margin-bottom: 1rem;
}

.health-good.settings-readiness-score,
.health-good.settings-area-card,
.health-good.settings-action-card {
    border-color: rgba(34, 197, 94, .24);
}

.health-warning.settings-readiness-score,
.health-warning.settings-area-card,
.health-warning.settings-action-card {
    border-color: rgba(245, 158, 11, .32);
}

.health-critical.settings-readiness-score,
.health-critical.settings-area-card,
.health-critical.settings-action-card {
    border-color: rgba(239, 68, 68, .32);
}

.health-good.settings-area-card,
.health-good.settings-action-card {
    border-left-color: rgba(34, 197, 94, .65);
}

.health-warning.settings-area-card,
.health-warning.settings-action-card {
    border-left-color: rgba(245, 158, 11, .75);
}

.health-critical.settings-area-card,
.health-critical.settings-action-card {
    border-left-color: rgba(239, 68, 68, .75);
}

@media (max-width: 900px) {
    .settings-governance-panel,
    .settings-action-card {
        grid-template-columns: 1fr;
    }

    .settings-export-actions,
    .settings-action-meta {
        justify-content: flex-start;
        text-align: left;
    }
}

/* Product module polish pass */
.product-ops-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.product-ops-card {
    border: 1px solid rgba(15, 23, 42, .08);
    background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.product-ops-card span,
.product-ops-card small {
    display: block;
    color: #5b7086;
}

.product-ops-card strong {
    display: block;
    font-size: 2rem;
    color: #16324f;
    margin: .25rem 0;
}

.product-ops-card.primary {
    border-color: rgba(220, 38, 38, .18);
    background: linear-gradient(135deg, #fff7f7, #ffffff);
}

.product-ops-card.warning {
    border-color: rgba(245, 158, 11, .24);
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.product-polish-grid {
    gap: 1rem;
    margin: 1.25rem 0;
}

.product-polish-panel {
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .06);
}

.product-polish-panel .muted {
    margin: .2rem 0 0;
}

.action-plan-list {
    display: grid;
    gap: .75rem;
}

.action-plan-item {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    padding: .85rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 16px;
    background: #fff;
}

.action-plan-item p {
    margin: .15rem 0 0;
    color: #5b7086;
}

.action-button-row,
.compact-actions {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
}

.inline-action-form {
    display: inline;
    margin: 0;
}

.link-button {
    border: 0;
    background: transparent;
    color: #2563eb;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
}

.small-button {
    padding: .4rem .65rem;
    font-size: .85rem;
}

.table-subtitle {
    display: block;
    color: #5b7086;
    font-size: .85rem;
    margin-top: .15rem;
}

.policy-card {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background: #f6f9fc;
    border: 1px solid rgba(15, 23, 42, .08);
}

.bulk-import-panel textarea {
    width: 100%;
    min-height: 150px;
    font-family: Consolas, 'Courier New', monospace;
}

.link-reset {
    color: inherit;
    text-decoration: none;
}

.report-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    margin: .75rem 0 1rem;
}

.report-link-grid a {
    display: block;
    padding: .8rem .9rem;
    border-radius: 14px;
    background: #f6f9fc;
    border: 1px solid rgba(15, 23, 42, .08);
    font-weight: 700;
    text-decoration: none;
}

.status-badge.escalate,
.status-badge.status-escalate {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.watch,
.status-badge.status-watch {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.normal,
.status-badge.status-normal,
.status-badge.good {
    background: #dcfce7;
    color: #166534;
}

@media (max-width: 1100px) {
    .product-ops-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .product-ops-grid,
    .report-link-grid {
        grid-template-columns: 1fr;
    }

    .action-plan-item {
        flex-direction: column;
    }
}

/* Enterprise readiness / platform governance bulk pass */
.enterprise-readiness-panel { margin-top: 1.25rem; }
.support-evidence-list,
.recent-activity-list { display: grid; gap: .75rem; }
.support-evidence-row,
.recent-activity-row { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border: 1px solid rgba(15, 23, 42, .08); border-radius: 18px; background: rgba(255,255,255,.72); text-decoration: none; color: inherit; }
.support-evidence-row strong,
.recent-activity-row strong { display: block; color: #0f172a; }
.support-evidence-row span,
.recent-activity-row span { display: block; font-size: .82rem; color: #64748b; margin-top: .15rem; }
.support-evidence-row p,
.recent-activity-row p { margin: .35rem 0 0; color: #475569; }
.support-evidence-status { min-width: 140px; text-align: right; }
.support-evidence-status span { display: inline-block; padding: .25rem .55rem; border-radius: 999px; background: #eef2ff; color: #3730a3; font-weight: 700; }
.support-evidence-status small,
.recent-activity-row time { display: block; color: #64748b; margin-top: .25rem; font-size: .78rem; }
.license-governance-kpis { margin-top: 1rem; }
.users-enterprise-grid { margin: 1rem 0; }
.audit-filter-card { margin: 1rem 0; }
.audit-filter-card .filter-grid { align-items: end; }
@media (max-width: 860px) {
    .support-evidence-row,
    .recent-activity-row { flex-direction: column; }
    .support-evidence-status { min-width: 0; text-align: left; }
}

/* -------------------------------------------------------------------------
   Giraffe platform UI consistency pass
   Shared chrome, responsive behaviour, accessibility and component polish.
   ------------------------------------------------------------------------- */
:root {
    --surface: #ffffff;
    --surface-soft: #f8fbfe;
    --surface-strong: #eef6fc;
    --ink: var(--text);
    --ink-muted: var(--muted);
    --border-soft: rgba(133, 154, 176, .32);
    --shadow-soft: 0 16px 42px rgba(8, 48, 90, .09);
    --shadow-hover: 0 20px 56px rgba(8, 48, 90, .14);
    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --focus-ring: 0 0 0 4px rgba(0, 94, 184, .18);
    --danger: #b42318;
    --warning: #b54708;
    --info: #175cd3;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9999;
    transform: translateY(-160%);
    background: #ffffff;
    color: var(--nhs-accent);
    border: 2px solid var(--nhs-accent);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}
.skip-link:focus { transform: translateY(0); outline: none; }

.portal-content {
    min-width: 0;
    position: relative;
}
.page-content-stack {
    display: grid;
    gap: 24px;
}
.page-content-stack > section,
.page-content-stack > form,
.page-content-stack > .card,
.page-content-stack > .table-card,
.page-content-stack > .admin-submenu {
    margin-bottom: 0;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: -36px -36px 28px;
    padding: 16px 36px;
    background: rgba(243, 247, 251, .86);
    border-bottom: 1px solid rgba(217, 227, 238, .88);
    backdrop-filter: blur(14px);
}
.app-topbar-title {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.app-topbar-title span {
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .72rem;
    font-weight: 800;
}
.app-topbar-title strong {
    color: var(--ink);
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}
.topbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    color: var(--ink);
    font-weight: 800;
    font-size: .9rem;
    box-shadow: 0 8px 20px rgba(8, 48, 90, .06);
}
.topbar-link.primary {
    background: var(--nhs-accent);
    color: #ffffff;
    border-color: transparent;
}
.topbar-link:hover { text-decoration: none; transform: translateY(-1px); }

.mobile-nav-toggle {
    display: none;
    position: fixed;
    left: 14px;
    top: 12px;
    z-index: 210;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 999px;
    padding: 10px 14px;
    background: #08305a;
    color: #ffffff;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(5, 24, 44, .48);
    backdrop-filter: blur(3px);
}

.card,
.table-card,
.sub-card,
.portal-module-card,
.portal-admin-card,
.portal-suite-card,
.admin-submenu,
.health-panel,
.portal-banner,
.command-home-card,
.product-ops-card,
.ticket-work-panel,
.asset-card,
.location-node,
.readiness-item,
.attention-item {
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}
.card:hover,
.table-card:hover,
.portal-module-card:hover,
.portal-admin-card:hover,
.portal-suite-card:hover,
.product-ops-card:hover,
.ticket-work-panel:hover,
.asset-card:hover {
    border-color: rgba(0, 94, 184, .24);
    box-shadow: var(--shadow-hover);
}

.page-header,
.portal-hero,
.health-hero,
.command-centre-hero,
.release-hero,
.integration-hero,
.executive-hero,
.asset-hero,
.water-hero,
.survey-hero {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
}
.page-header::after,
.portal-hero::after,
.health-hero::after,
.command-centre-hero::after,
.release-hero::after,
.integration-hero::after,
.executive-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -120px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 94, 184, .14), rgba(0, 94, 184, 0) 68%);
    pointer-events: none;
}
.page-header > *,
.portal-hero > *,
.health-hero > *,
.command-centre-hero > *,
.release-hero > *,
.integration-hero > *,
.executive-hero > * { position: relative; z-index: 1; }

.hero-actions,
.actions,
.action-row,
.export-actions,
.card-title-row,
.section-title-row {
    align-items: center;
}
.button,
button,
input[type="submit"] {
    min-height: 42px;
}
.button,
.topbar-link,
.pill,
.status-pill,
.suite-status-pill,
.health-pill {
    text-decoration: none !important;
}
.button.subtle,
.button.secondary {
    background: #eef6fc;
    color: var(--nhs-accent);
    border: 1px solid rgba(0, 94, 184, .2);
}
.button.danger,
button.danger {
    background: var(--danger);
    color: #ffffff;
}
.button[disabled],
button[disabled],
.disabled {
    opacity: .58;
    cursor: not-allowed;
    filter: grayscale(.15);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}
input,
select,
textarea {
    min-height: 44px;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
textarea { min-height: 112px; resize: vertical; }
input:hover,
select:hover,
textarea:hover { border-color: rgba(0, 94, 184, .38); }
.form-grid,
.filter-grid,
.admin-filter-grid,
.ticket-filter-grid,
.asset-filter-grid,
.location-form-grid {
    align-items: end;
}
label small,
.form-hint,
.hint {
    display: block;
    margin-top: 5px;
    color: var(--ink-muted);
    font-weight: 600;
    line-height: 1.45;
}

.responsive-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid rgba(217, 227, 238, .72);
    background: #ffffff;
}
.responsive-table-wrap table {
    min-width: 760px;
}
table th {
    position: relative;
    white-space: nowrap;
}
table tbody tr:hover td {
    background: rgba(0, 94, 184, .035);
}
.table-card table tr:last-child td,
.responsive-table-wrap table tr:last-child td { border-bottom: 0; }

.status-pill,
.pill,
.suite-badge,
.health-pill,
.risk-chip,
.priority-chip,
.readiness-area {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.1;
}
.status-good,
.status-strong,
.status-healthy,
.health-good,
.risk-low {
    --status-bg: #ecfdf3;
    --status-fg: #027a48;
}
.status-warning,
.status-controlled,
.status-needs-attention,
.health-warning,
.risk-moderate {
    --status-bg: #fffaeb;
    --status-fg: #b54708;
}
.status-critical,
.status-at-risk,
.health-critical,
.risk-high {
    --status-bg: #fef3f2;
    --status-fg: #b42318;
}
.status-significant,
.risk-significant {
    --status-bg: #fdf2fa;
    --status-fg: #c11574;
}
.status-pill,
.health-pill,
.risk-chip,
.priority-chip {
    background: var(--status-bg, #eef6fc);
    color: var(--status-fg, var(--nhs-accent));
    border: 1px solid color-mix(in srgb, var(--status-fg, var(--nhs-accent)) 22%, transparent);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: .82rem;
    font-weight: 800;
}

.admin-submenu {
    padding: 16px;
    position: sticky;
    top: 76px;
    z-index: 35;
}
.admin-submenu-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.admin-submenu-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f4f8fc;
    color: var(--ink);
    border: 1px solid transparent;
    font-weight: 800;
    font-size: .88rem;
}
.admin-submenu-links a:hover,
.admin-submenu-links a.active {
    background: var(--nhs-accent);
    color: #ffffff;
    text-decoration: none;
    border-color: var(--nhs-accent);
}

.empty-state,
.no-data,
.blank-state {
    border: 1px dashed rgba(0, 94, 184, .34);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f4faff 100%);
    padding: 24px;
    color: var(--ink-muted);
}
.empty-state strong,
.no-data strong,
.blank-state strong { color: var(--ink); }

.validation-summary,
.alert,
.status-card {
    border-radius: 18px;
    border: 1px solid rgba(0, 94, 184, .22);
    background: #f4faff;
}
.validation-summary ul { margin: 8px 0 0; }
.validation-summary.errors,
.alert-danger,
.status-card.danger {
    border-color: rgba(180, 35, 24, .28);
    background: #fff4f2;
    color: #7a271a;
}
.alert-warning,
.status-card.warning {
    border-color: rgba(181, 71, 8, .28);
    background: #fffaeb;
    color: #7a2e0e;
}
.alert-success,
.status-card.success {
    border-color: rgba(2, 122, 72, .28);
    background: #ecfdf3;
    color: #054f31;
}

.metric-card,
.product-ops-card,
.kpi-card,
.summary-card {
    min-height: 132px;
}
.metric-card small,
.product-ops-card small,
.kpi-card small,
.summary-card small {
    color: var(--ink-muted);
    line-height: 1.45;
}
.metric-card strong,
.product-ops-card strong,
.kpi-card strong {
    letter-spacing: -.04em;
}

.suite-sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
}
.suite-solution-links a.active,
.suite-admin-links a.active,
.suite-home-link.active {
    background: rgba(255,255,255,.18);
    color: #ffffff;
    box-shadow: inset 3px 0 0 rgba(255,255,255,.78);
}
.suite-solution-card summary { cursor: pointer; }
.suite-solution-card summary::-webkit-details-marker,
.suite-admin-dropdown summary::-webkit-details-marker { display: none; }
.suite-chevron { transition: transform .18s ease; }
details[open] > summary .suite-chevron { transform: rotate(90deg); }

@media (max-width: 1200px) {
    .app-topbar { margin: -24px -24px 24px; padding: 14px 24px; }
    .app-topbar-actions .topbar-link:not(.primary) { display: none; }
    .admin-submenu { top: 66px; }
}

@media (max-width: 900px) {
    body { padding-top: 58px; }
    .mobile-nav-toggle { display: inline-flex; }
    .multi-shell { display: block; }
    .suite-sidebar {
        position: fixed;
        z-index: 200;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(88vw, 360px);
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 26px 0 70px rgba(5, 24, 44, .38);
    }
    body.mobile-sidebar-open .suite-sidebar { transform: translateX(0); }
    body.mobile-sidebar-open .sidebar-backdrop { display: block; }
    .portal-content { padding: 18px; }
    .app-topbar {
        position: static;
        margin: 0 0 18px;
        padding: 14px 16px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: var(--shadow-soft);
    }
    .app-topbar-actions { display: none; }
    .page-content-stack { gap: 18px; }
    .admin-submenu { position: static; }
    .admin-submenu-links { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .admin-submenu-links a { white-space: nowrap; }
    .page-header,
    .portal-hero,
    .health-hero,
    .command-centre-hero,
    .release-hero,
    .integration-hero,
    .executive-hero { border-radius: 22px; }
}

@media (max-width: 640px) {
    .portal-content { padding: 14px; }
    .hero-actions,
    .actions,
    .export-actions,
    .card-title-row,
    .section-title-row { align-items: stretch; }
    .hero-actions .button,
    .actions .button,
    .export-actions .button,
    .card-title-row .button,
    .section-title-row .button { width: 100%; }
    .metric-card strong,
    .product-ops-card strong { font-size: 1.7rem; }
    .card,
    .table-card,
    .sub-card { padding: 18px; border-radius: 20px; }
}

@media print {
    .suite-sidebar,
    .mobile-nav-toggle,
    .sidebar-backdrop,
    .app-topbar,
    .admin-submenu,
    .hero-actions,
    .actions,
    .button { display: none !important; }
    .shell,
    .multi-shell { display: block !important; }
    .content,
    .portal-content { padding: 0 !important; }
    body { background: #ffffff !important; color: #111827 !important; padding: 0 !important; }
    .card,
    .table-card,
    .sub-card { box-shadow: none !important; break-inside: avoid; }
}

/* Go-live readiness / support centre bulk pass */
.go-live-panel {
    border: 1px solid rgba(15, 118, 110, .18);
    background: linear-gradient(180deg, rgba(240, 253, 250, .72), #fff);
}

.support-evidence-row[href], .recent-activity-row[href] {
    color: inherit;
    text-decoration: none;
}

.support-evidence-row[href]:hover, .recent-activity-row[href]:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.action-row {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
    align-items: center;
}

.action-row a {
    font-weight: 700;
}

.audit-filter-card .filter-grid {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.enterprise-readiness-panel .health-table td,
.enterprise-readiness-panel .health-table th,
.go-live-panel .health-table td,
.go-live-panel .health-table th {
    vertical-align: top;
}

.status-dot.health-good,
.status-dot.health-warning,
.status-dot.health-critical,
.status-dot.health-muted {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.status-dot.health-good::before,
.status-dot.health-warning::before,
.status-dot.health-critical::before,
.status-dot.health-muted::before {
    content: "";
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    background: currentColor;
}

@media (max-width: 900px) {
    .audit-filter-card .filter-grid {
        grid-template-columns: 1fr;
    }

    .health-pill-row {
        align-items: stretch;
    }

    .health-pill-row .health-pill {
        justify-content: center;
    }
}

/* Reporting & Export Pack */
.reporting-pack-hero {
    overflow: hidden;
}

.reporting-score-grid .metric-card strong {
    letter-spacing: -0.04em;
}

.reporting-export-panel .card-title-row {
    align-items: flex-start;
}

.report-pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.report-pack-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.9));
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.report-pack-card:hover,
.report-pack-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.11);
    border-color: color-mix(in srgb, var(--nhs-accent), transparent 55%);
}

.report-pack-card h3 {
    margin: .2rem 0 .35rem;
    font-size: 1rem;
}

.report-pack-card p {
    margin: 0 0 .75rem;
    color: var(--muted, #64748b);
    line-height: 1.45;
}

.report-pack-card strong {
    align-self: flex-start;
    padding: .35rem .6rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, .10);
    color: var(--nhs-accent);
    white-space: nowrap;
    font-size: .78rem;
}

.report-board-list {
    display: grid;
    gap: .85rem;
}

.report-board-item {
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
}

.report-board-item p {
    margin: .45rem 0 0;
    color: var(--muted, #64748b);
}

@media print {
    .reporting-export-panel .button,
    .reporting-export-panel .health-pill-row,
    .admin-submenu,
    .suite-sidebar,
    .app-topbar,
    .mobile-nav-toggle,
    .sidebar-backdrop {
        display: none !important;
    }

    .report-pack-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Offline survey mode */
.offline-survey-header {
    align-items: center;
}

.offline-status-pill {
    border-radius: 999px;
    padding: .75rem 1rem;
    font-weight: 800;
    background: rgba(22, 50, 79, .08);
    color: #16324f;
    white-space: nowrap;
}

.offline-status-pill.is-online {
    background: rgba(52, 182, 162, .16);
    color: #176f63;
}

.offline-status-pill.is-offline {
    background: rgba(242, 139, 84, .18);
    color: #9a4b19;
}

.offline-survey-shell {
    display: grid;
    gap: 1.25rem;
}

.offline-survey-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    gap: 1.25rem;
    align-items: start;
}

.offline-survey-card,
.offline-editor-card,
.offline-survey-nudge {
    border: 1px solid rgba(22, 50, 79, .08);
    box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

.offline-survey-card--hero,
.offline-survey-nudge {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(52, 182, 162, .14), transparent 32%),
        linear-gradient(135deg, #ffffff, #f7fbff);
}

.offline-survey-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.offline-survey-card-header h3,
.offline-survey-card--hero h3,
.offline-survey-nudge h3 {
    margin: .2rem 0 .35rem;
}

.offline-survey-card-header p,
.offline-survey-card--hero p,
.offline-survey-nudge p {
    color: #5b7086;
    margin: 0;
}

.offline-survey-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    justify-content: flex-end;
}

.offline-local-list {
    display: grid;
    gap: .75rem;
}

.offline-local-item {
    width: 100%;
    border: 1px solid rgba(22, 50, 79, .10);
    background: #fff;
    border-radius: 18px;
    padding: .85rem 1rem;
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    text-align: left;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.offline-local-item:hover,
.offline-local-item.active {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, .32);
    box-shadow: 0 14px 30px rgba(37, 99, 235, .12);
}

.offline-local-item.is-synced {
    opacity: .68;
}

.offline-local-item span {
    display: grid;
    gap: .2rem;
}

.offline-local-item small {
    color: #5b7086;
}

.offline-local-item em {
    font-style: normal;
    border-radius: 999px;
    padding: .35rem .6rem;
    background: rgba(22, 50, 79, .07);
    color: #16324f;
    font-weight: 800;
    align-self: start;
    white-space: nowrap;
}

.offline-editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .85rem;
    border: 1px solid rgba(22, 50, 79, .08);
    border-radius: 18px;
    background: #f7fbff;
    margin-bottom: 1rem;
}

.offline-editor-toolbar div {
    text-align: center;
    display: grid;
    gap: .15rem;
}

.offline-editor-toolbar span {
    color: #5b7086;
    font-size: .9rem;
}

.offline-editor-questions {
    display: grid;
    gap: 1rem;
}

.offline-question-card {
    border: 1px solid rgba(22, 50, 79, .08);
    border-radius: 22px;
    padding: 1rem;
    background: #fff;
}

.offline-question-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.offline-question-head span {
    color: #5b7086;
    font-size: .85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.offline-question-head strong {
    display: block;
    margin-top: .2rem;
    color: #16324f;
    font-size: 1.02rem;
}

.offline-question-head p {
    margin: .35rem 0 0;
    color: #5b7086;
}

.offline-sync-log {
    display: grid;
    gap: .5rem;
}

.offline-sync-log-row {
    padding: .75rem .9rem;
    border-radius: 14px;
    background: rgba(22, 50, 79, .06);
    color: #16324f;
    font-weight: 700;
}

.offline-sync-log-row.success {
    background: rgba(52, 182, 162, .15);
    color: #176f63;
}

.offline-sync-log-row.error {
    background: rgba(242, 139, 84, .18);
    color: #9a4b19;
}

.suite-public-links {
    padding: .6rem;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    margin-bottom: 1rem;
}

@media (max-width: 980px) {
    .offline-survey-grid,
    .offline-survey-card--hero,
    .offline-survey-nudge,
    .offline-survey-card-header,
    .offline-question-head {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .offline-survey-actions {
        justify-content: flex-start;
    }

    .offline-editor-toolbar {
        flex-direction: column;
    }
}

@media print {
    .offline-survey-actions,
    .offline-status-pill {
        display: none !important;
    }
}


/* Demo Data Mode */
.demo-hero {
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, .18), transparent 32rem),
        linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 64, 175, .88));
    color: #fff;
}

.demo-hero p,
.demo-hero .eyebrow {
    color: rgba(255,255,255,.78);
}

.demo-hero .hero-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.demo-status-grid,
.demo-guidance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.demo-guidance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-status-card {
    position: relative;
    overflow: hidden;
}

.demo-status-card strong {
    display: block;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1;
    margin: .35rem 0;
}

.demo-status-card--enabled::before,
.demo-status-card--disabled::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: .45rem;
}

.demo-status-card--enabled::before {
    background: #16a34a;
}

.demo-status-card--disabled::before {
    background: #64748b;
}

.demo-metric-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.professional-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted-text, #475569);
}

.professional-list li + li {
    margin-top: .45rem;
}

.timeline-list {
    display: grid;
    gap: .8rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .8rem;
    align-items: start;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 1rem;
    background: rgba(248, 250, 252, .72);
}

.timeline-marker {
    width: .8rem;
    height: .8rem;
    border-radius: 999px;
    margin-top: .35rem;
    background: var(--nhs-accent, #2563eb);
    box-shadow: 0 0 0 .25rem rgba(37, 99, 235, .12);
}

.timeline-item p {
    margin: .15rem 0 .25rem;
}

.timeline-item span {
    color: var(--muted-text, #64748b);
    font-size: .88rem;
}

.button.danger {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.button.danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

@media (max-width: 1100px) {
    .demo-status-grid,
    .demo-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .demo-guidance-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .demo-status-grid,
    .demo-metric-grid {
        grid-template-columns: 1fr;
    }

    .demo-hero .hero-actions {
        justify-content: stretch;
    }

    .demo-hero .hero-actions form,
    .demo-hero .hero-actions .button {
        width: 100%;
    }
}

/* -------------------------------------------------------------------------
   Chrome clean-up pass: remove duplicate page headings, hide skip link until
   keyboard focus, and give module landing pages a consistent professional top.
   ------------------------------------------------------------------------- */
.skip-link {
    position: fixed !important;
    top: 12px;
    left: 12px;
    z-index: 9999;
    transform: translateY(-180%) !important;
    background: #fff;
    color: var(--nhs-accent);
    border: 2px solid var(--nhs-accent);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
    box-shadow: 0 16px 42px rgba(8,48,90,.12);
}
.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0) !important;
    outline: none;
}
.mobile-nav-toggle { display: none !important; }
.app-topbar {
    justify-content: flex-end;
    min-height: 68px;
}
.app-topbar--actions-only .app-topbar-title { display: none !important; }
.app-topbar-actions { margin-left: auto; }

.module-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    padding: clamp(24px, 3vw, 34px);
    border-radius: 32px;
    border: 1px solid rgba(255,255,255,.45);
    box-shadow: 0 24px 70px rgba(8,48,90,.14);
    overflow: hidden;
    position: relative;
}
.module-hero:after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -120px;
    bottom: -150px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
}
.module-hero > * { position: relative; z-index: 1; }
.module-hero .eyebrow { color: rgba(255,255,255,.78); }
.module-hero h1,
.module-hero h2 {
    margin: .2rem 0 .65rem;
    color: #fff;
    font-size: clamp(2.2rem, 4vw, 4.1rem);
    line-height: .98;
    letter-spacing: -.06em;
}
.module-hero p {
    margin: 0;
    max-width: 840px;
    color: rgba(255,255,255,.86);
    font-size: 1.06rem;
    line-height: 1.6;
}
.module-hero-actions,
.module-hero .dashboard-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    min-width: min(420px, 100%);
}
.module-hero .button,
.module-hero .toolbar-search,
.module-hero .toolbar-filters span {
    min-height: 44px;
    border-color: rgba(255,255,255,.28);
    background: rgba(255,255,255,.15);
    color: #fff;
    box-shadow: none;
    backdrop-filter: blur(8px);
}
.module-hero .button:not(.ghost) {
    background: #fff;
    color: var(--nhs-accent);
    border-color: transparent;
}
.module-hero .button.ghost:hover,
.module-hero .toolbar-filters span:hover {
    background: rgba(255,255,255,.22);
    text-decoration: none;
}
.module-hero--surveys {
    background: radial-gradient(circle at 10% 10%, rgba(125,211,252,.32), transparent 34%), linear-gradient(135deg, #073763 0%, #005eb8 48%, #3b82f6 100%);
}
.module-hero--tickets {
    background: radial-gradient(circle at 12% 14%, rgba(251,191,36,.28), transparent 34%), linear-gradient(135deg, #172554 0%, #1d4ed8 52%, #0f766e 100%);
}
.asset-command-hero {
    margin-bottom: 24px;
}
@media (max-width: 900px) {
    .mobile-nav-toggle { display: inline-flex !important; }
    .app-topbar { min-height: auto; }
    .module-hero {
        display: grid;
        border-radius: 24px;
        padding: 22px;
    }
    .module-hero-actions,
    .module-hero .dashboard-toolbar {
        justify-content: flex-start;
        min-width: 0;
    }
    .module-hero h1,
    .module-hero h2 { font-size: 2.2rem; }
}

/* Device Monitoring */
.dm-hero{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,.8fr);gap:1.5rem;margin-bottom:1.5rem;padding:1.75rem;border-radius:24px;background:linear-gradient(135deg,#0b3d4a 0%,#146c80 55%,#1a8a6e 100%);color:#fff}
.dm-eyebrow{text-transform:uppercase;letter-spacing:.08em;font-size:.75rem;opacity:.8;margin:0}
.dm-hero h1{margin:.25rem 0 .5rem;font-size:clamp(1.8rem,3vw,2.6rem);letter-spacing:-.03em}
.dm-lead{max-width:40rem;opacity:.9;margin:0 0 1rem}
.dm-actions{display:flex;flex-wrap:wrap;gap:.5rem}
.dm-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:.6rem}
.dm-card{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);border-radius:14px;padding:.75rem;display:flex;flex-direction:column;gap:.2rem}
.dm-card span{font-size:.75rem;opacity:.85}.dm-card strong{font-size:1.4rem}
.dm-section{margin:1.5rem 0}.dm-section-head{display:flex;justify-content:space-between;align-items:baseline;gap:1rem}
.dm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1rem}
.dm-device-card{display:block;padding:1rem 1.1rem;border-radius:16px;border:1px solid #e5e7eb;background:#fff;text-decoration:none;color:inherit;box-shadow:0 8px 24px rgba(15,23,42,.04);transition:transform .15s ease,box-shadow .15s ease}
.dm-device-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(15,23,42,.08)}
.dm-device-top{display:flex;justify-content:space-between;gap:.75rem;align-items:flex-start}
.dm-device-top h3{margin:0;font-size:1.05rem}
.dm-activity{font-weight:700;margin:.35rem 0}
.dm-alert{color:#b42318;font-weight:700;margin:.25rem 0 0}
.dm-badge{display:inline-flex;align-items:center;padding:.2rem .55rem;border-radius:999px;font-size:.72rem;font-weight:800;background:#eef2f6;color:#344054}
.dm-badge.online{background:#dcfae6;color:#027a48}.dm-badge.offline{background:#fee4e2;color:#b42318}.dm-badge.inuse{background:#ffefd6;color:#b54708}
.dm-detail-header{display:flex;justify-content:space-between;gap:1.5rem;flex-wrap:wrap;margin:1rem 0 1.5rem}
.dm-detail-meta{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));gap:.75rem}
.dm-detail-meta span{display:block;font-size:.75rem;color:#667085}.dm-detail-meta strong{font-size:1rem}
.dm-badges{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.6rem}
.dm-port-row{display:grid;grid-template-columns:80px 1fr 1fr 1fr auto 1.2fr;gap:.5rem;align-items:center;margin-bottom:.6rem}
.dm-port-form input,.dm-port-form select,.dm-inline-form input,.dm-inline-form select,.dm-wizard input{padding:.45rem .6rem;border:1px solid #d0d5dd;border-radius:8px}
.dm-inline-form,.dm-wizard{display:flex;flex-wrap:wrap;gap:.6rem;align-items:end;max-width:720px}
.dm-wizard label{display:flex;flex-direction:column;gap:.3rem;width:100%}
.dm-command-list{list-style:none;padding:0}.dm-command-list li{padding:.4rem 0;border-bottom:1px solid #eee;font-size:.9rem}
.dm-command-list code{display:block;font-size:.75rem;color:#475467;white-space:pre-wrap;word-break:break-word}
@media (max-width:900px){.dm-hero{grid-template-columns:1fr}.dm-port-row{grid-template-columns:1fr}}

.dm-ops{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.75rem;margin:0 0 1.25rem}
.dm-ops-card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:.85rem 1rem;display:flex;flex-direction:column;gap:.25rem;box-shadow:0 6px 18px rgba(15,23,42,.04)}
.dm-ops-card span{font-size:.75rem;color:#667085;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.dm-ops-card strong{font-size:1.25rem}
.dm-attention{list-style:none;padding:0;margin:0;display:grid;gap:.65rem}
.dm-attention li{display:grid;grid-template-columns:88px 1fr;gap:.75rem;padding:.85rem 1rem;border:1px solid #e5e7eb;border-radius:12px;background:#fff}
.dm-sev-critical,.dm-sev-high{color:#b42318}.dm-sev-medium,.dm-sev-warning{color:#b54708}.dm-sev-low,.dm-sev-info{color:#027a48}

.dm-hero-compact{margin-bottom:1rem}
.dm-range{display:inline-flex;gap:.35rem;padding:.25rem;border-radius:999px;background:rgba(255,255,255,.16)}
.dm-range button{border:0;background:transparent;color:#fff;font-weight:700;padding:.35rem .7rem;border-radius:999px;cursor:pointer}
.dm-range button.active{background:#fff;color:#0b3d4a}
.dm-analytics-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem}
.dm-panel{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:1rem 1.1rem;box-shadow:0 8px 20px rgba(15,23,42,.04)}
.dm-panel h2{margin:0 0 .85rem;font-size:1.05rem}
.dm-bars{display:grid;gap:.45rem}
.dm-bar-row{display:grid;grid-template-columns:92px 1fr 64px;gap:.5rem;align-items:center}
.dm-bar-label{font-size:.78rem;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dm-bar-track{height:10px;border-radius:999px;background:#eef2f6;overflow:hidden}
.dm-bar-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,#146c80,#1a8a6e)}
.dm-bar-value{font-size:.78rem;font-weight:700;text-align:right}
.dm-report-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.85rem}
.dm-report-card{display:flex;flex-direction:column;gap:.35rem;padding:1rem;border:1px solid #e5e7eb;border-radius:14px;background:#fff;text-decoration:none;color:inherit}
.dm-report-card:hover{border-color:#99c2cc}

/* Device Monitoring — filters + live graphics */
.dm-filters{position:sticky;top:.75rem;z-index:5;display:flex;flex-wrap:wrap;gap:.55rem;align-items:center;padding:.7rem .85rem;margin:0 0 1.1rem;border:1px solid #d9e3ee;border-radius:16px;background:rgba(255,255,255,.92);backdrop-filter:blur(8px);box-shadow:0 8px 24px rgba(8,48,90,.06)}
.dm-filters input[type=search],.dm-filters select{border:1px solid #d0d5dd;border-radius:10px;padding:.45rem .65rem;min-width:140px;background:#fff;color:#16324f}
.dm-filters input[type=search]{flex:1 1 220px;min-width:180px}
.dm-filter-count{margin-left:auto;font-size:.82rem}
.dm-live-dot{width:.65rem;height:.65rem;border-radius:50%;background:#12b76a;box-shadow:0 0 0 0 rgba(18,183,106,.55);animation:dmPulse 1.8s ease-out infinite;display:inline-block}
@keyframes dmPulse{0%{box-shadow:0 0 0 0 rgba(18,183,106,.45)}70%{box-shadow:0 0 0 10px rgba(18,183,106,0)}100%{box-shadow:0 0 0 0 rgba(18,183,106,0)}}
.dm-live-rail{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(180px,220px);gap:.75rem;overflow-x:auto;padding-bottom:.35rem}
.dm-live-tile{display:flex;flex-direction:column;gap:.45rem;padding:.85rem .95rem;border:1px solid #e5e7eb;border-radius:14px;background:#fff;text-decoration:none;color:inherit;box-shadow:0 8px 20px rgba(15,23,42,.04)}
.dm-live-tile strong{font-size:.95rem}
.dm-device-body{display:grid;grid-template-columns:72px 1fr;gap:.75rem;align-items:start;margin-top:.55rem}
.dm-mini-tank{display:flex;flex-direction:column;align-items:center;gap:.25rem;font-size:.72rem;font-weight:700;color:#146c80}
.dm-mini-tank-shell{width:34px;height:52px;border:2px solid #99c2cc;border-radius:8px 8px 4px 4px;background:linear-gradient(180deg,#f8fafc,#eef6f8);overflow:hidden;display:flex;align-items:flex-end}
.dm-mini-tank-water{width:100%;background:linear-gradient(180deg,#5ec8d8,#146c80);transition:height .45s ease}
.dm-mini-pipe{display:flex;flex-direction:column;gap:.3rem;font-size:.72rem;font-weight:700;color:#0f766e}
.dm-mini-pipe-track{height:10px;border-radius:999px;background:#e8eef2;overflow:hidden}
.dm-mini-pipe-fill{height:100%;width:100%;transform-origin:left center;background:linear-gradient(90deg,#146c80,#1a8a6e);border-radius:999px;transition:transform .35s ease}
.dm-mini-pipe.moving .dm-mini-pipe-fill{animation:dmFlow 1.1s linear infinite}
.dm-mini-idle{font-size:.75rem;color:#667085;padding-top:.85rem}
.dm-badge.leak{background:#fee4e2;color:#b42318}
.dm-live-ports{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}
.dm-gauge-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:1rem 1.1rem;box-shadow:0 10px 28px rgba(15,23,42,.05)}
.dm-gauge-head{display:flex;justify-content:space-between;gap:.75rem;align-items:center;margin-bottom:.25rem}
.dm-tank{display:grid;grid-template-columns:88px 1fr;gap:1rem;align-items:center;margin-top:.65rem}
.dm-tank-shell{position:relative;width:72px;height:120px;border:3px solid #7aa8b5;border-radius:14px 14px 8px 8px;background:linear-gradient(180deg,#f7fbfd,#e8f2f5);overflow:hidden;display:flex;align-items:flex-end;justify-content:center}
.dm-tank-shell.empty{background:repeating-linear-gradient(135deg,#f8fafc,#f8fafc 8px,#eef2f6 8px,#eef2f6 16px)}
.dm-tank-water{width:100%;background:linear-gradient(180deg,#67d4e3 0%,#146c80 100%);transition:height .5s ease;box-shadow:inset 0 8px 16px rgba(255,255,255,.25)}
.dm-tank-label{position:absolute;inset:auto 0 .45rem;text-align:center;font-size:.7rem;font-weight:800;color:#0b3d4a;text-shadow:0 1px 0 rgba(255,255,255,.65)}
.dm-pipe{margin:.7rem 0 .85rem}
.dm-pipe-track{position:relative;height:28px;border-radius:999px;background:#e8eef2;overflow:hidden;border:1px solid #d0d5dd}
.dm-pipe-fill{height:100%;width:100%;transform-origin:left center;background:linear-gradient(90deg,#0f766e,#146c80 40%,#5ec8d8);border-radius:999px;transition:transform .35s ease}
.dm-pipe.moving .dm-pipe-fill{animation:dmFlow 1s linear infinite}
.dm-pipe.leak .dm-pipe-fill{background:linear-gradient(90deg,#b42318,#f04438)}
.dm-pipe-bubbles{position:absolute;inset:0;pointer-events:none;opacity:0}
.dm-pipe.moving .dm-pipe-bubbles{opacity:1;background-image:radial-gradient(circle at 20% 50%,rgba(255,255,255,.55) 0 3px,transparent 4px),radial-gradient(circle at 55% 40%,rgba(255,255,255,.4) 0 2px,transparent 3px),radial-gradient(circle at 80% 60%,rgba(255,255,255,.5) 0 2.5px,transparent 3.5px);animation:dmBubbles 1.4s linear infinite}
@keyframes dmFlow{0%{filter:brightness(1)}50%{filter:brightness(1.12)}100%{filter:brightness(1)}}
@keyframes dmBubbles{from{background-position:0 0,0 0,0 0}to{background-position:48px 0,36px 0,56px 0}}
.dm-metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem .75rem}
.dm-metric-grid span{display:block;font-size:.7rem;text-transform:uppercase;letter-spacing:.04em;color:#667085;font-weight:700}
.dm-metric-grid strong{font-size:.95rem}
.dm-chart{min-height:240px}
.dm-chart-meta{display:flex;justify-content:space-between;gap:1rem;align-items:baseline;margin-bottom:.5rem}
.dm-svg-chart{width:100%;height:auto;display:block}
.dm-chart-axis{stroke:#d9e3ee;stroke-width:1}
.dm-chart-label{fill:#667085;font-size:11px}
@media (max-width:900px){
  .dm-device-body{grid-template-columns:1fr}
  .dm-tank{grid-template-columns:1fr}
  .dm-filters{position:static}
  .dm-filter-count{margin-left:0;width:100%}
}

/* Guided flow calibration */
.water-calibration-panel{
    display:grid;
    gap:1rem;
    padding:1.15rem;
    border-radius:22px;
}
.water-calibration-panel > select,
.water-calibration-panel > input[type="number"]{
    width:100%;
    max-width:560px;
}
.water-calibration-help{
    grid-template-columns:38px minmax(0,1fr);
    align-items:center;
}
.water-calibration-help > span{
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#0f172a;
    color:#fff;
    font-weight:900;
}
.water-calibration-help strong,
.water-calibration-help small{
    display:block;
}
.water-calibration-help small{
    margin-top:.15rem;
    color:#64748b;
}
.water-calibration-pill.online{
    background:#ecfdf3;
    color:#067647;
}
.water-calibration-pill.leak{
    background:#fef3f2;
    color:#b42318;
}
.calibration-save-row{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:.8rem;
}

.water-calibration-preset{
    display:grid;
    gap:.35rem;
    width:100%;
    max-width:560px;
}
.water-calibration-preset > span{
    font-weight:800;
}
.water-calibration-preset select{
    width:100%;
}
.calibration-reset-total{
    margin-top:1rem;
    padding-top:1rem;
    border-top:1px solid rgba(15,23,42,.12);
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:.75rem;
}
.calibration-reset-total select{
    min-width:220px;
}

.water-calibration-empty {
    display: grid;
    gap: .35rem;
    padding: 1rem;
    border: 1px dashed rgba(127, 127, 127, .45);
    border-radius: 12px;
}
