/* Public DigitalniDom hero composition overrides. */
.cn-hero {
    min-height: clamp(514px, calc(100svh - 206px), 624px) !important;
    padding-top: 36px !important;
    padding-bottom: 20px !important;
}

/* Settings hubs */
.shell .settings-hub {
    max-width: 1180px;
    margin: 0 auto;
    color: var(--dd-text);
}

.shell .settings-hub__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--dd-border);
}

.shell .settings-hub__eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
    color: var(--dd-primary);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.shell .settings-hub__header h1 {
    margin: 0;
    font-size: 25px;
    line-height: 1.15;
}

.shell .settings-hub__header p,
.shell .settings-hub__group-head p {
    margin: 5px 0 0;
    color: var(--dd-muted);
    font-size: 12px;
}

.shell .settings-hub__back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--dd-border);
    border-radius: 5px;
    color: #40534a;
    background: #fff;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

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

.shell .settings-hub__group {
    overflow: hidden;
    border: 1px solid var(--dd-border);
    border-radius: 6px;
    background: #fff;
}

.shell .settings-hub__group--wide {
    grid-column: 1 / -1;
}

.shell .settings-hub__group-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid var(--dd-border);
    background: #f7faf8;
}

.shell .settings-hub__group-head > i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid #c4dacb;
    border-radius: 5px;
    color: #1f6d49;
    background: #e9f4ed;
    font-size: 16px;
}

.shell .settings-hub__group-head h2 {
    margin: 0;
    font-size: 14px;
}

.shell .settings-hub__links {
    display: grid;
    padding: 6px;
}

.shell .settings-hub__links--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shell .settings-hub__links a {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 16px;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 11px 9px;
    border-radius: 5px;
    color: var(--dd-text);
    text-decoration: none;
}

.shell .settings-hub__links a + a {
    border-top: 1px solid #edf1ee;
}

.shell .settings-hub__links--grid a + a {
    border-top: 0;
    border-left: 1px solid #edf1ee;
}

.shell .settings-hub__links a:hover {
    background: #f1f7f3;
}

.shell .settings-hub__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--dd-border);
    border-radius: 5px;
    color: #2a6f4d;
    background: #fff;
    font-size: 15px;
}

.shell .settings-hub__links a > span:nth-child(2) {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.shell .settings-hub__links strong {
    font-size: 12px;
}

.shell .settings-hub__links small {
    color: var(--dd-muted);
    font-size: 10px;
    line-height: 1.4;
}

.shell .settings-hub__links a > .bi-chevron-right {
    color: #8b9992;
    font-size: 11px;
}

.shell .settings-hub__notice {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 14px;
}

.shell .settings-hub__notice > i {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 5px;
    color: #2c6749;
    background: #e9f4ed;
}

.shell .settings-hub__notice p {
    margin: 0;
    color: #53645c;
    font-size: 11px;
    line-height: 1.5;
}

.shell .settings-hub__notice a {
    color: #1f6d49;
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 760px) {
    .shell .settings-hub__header {
        align-items: stretch;
        flex-direction: column;
    }

    .shell .settings-hub__back {
        align-self: flex-start;
    }

    .shell .settings-hub__layout,
    .shell .settings-hub__links--grid {
        grid-template-columns: 1fr;
    }

    .shell .settings-hub__links--grid a + a {
        border-top: 1px solid #edf1ee;
        border-left: 0;
    }

    .shell .settings-hub__notice {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .shell .settings-hub__notice a {
        grid-column: 2;
    }
}

.cn-hero__content {
    max-width: min(760px, 49vw) !important;
}

.cn-hero h1 {
    font-size: clamp(40px, 4vw, 56px) !important;
}

.cn-hero p {
    margin-top: 12px !important;
    line-height: 1.45 !important;
}

.cn-hero__actions {
    margin-top: 18px !important;
}

.cn-hero__stats {
    margin-top: 12px !important;
}

.cn-hero__stats div {
    padding: 7px 11px !important;
}

.cn-product-shot {
    right: clamp(20px, 4vw, 70px) !important;
    top: 92px !important;
    width: min(520px, 38vw) !important;
}

@media (max-width: 980px) {
    .cn-hero__content {
        max-width: 790px !important;
    }
}

@media (max-width: 640px) {
    .cn-hero {
        min-height: calc(100svh - 188px) !important;
        padding: 28px 18px 16px !important;
    }

    .cn-hero h1 {
        font-size: 36px !important;
    }

    .cn-hero p {
        margin-top: 10px !important;
        font-size: 16px !important;
        line-height: 1.4 !important;
    }

    .cn-hero__actions {
        flex-wrap: nowrap !important;
        gap: 7px !important;
        margin-top: 16px !important;
    }

    .cn-hero .cn-btn {
        min-height: 40px !important;
        padding: 8px 10px !important;
        font-size: 13px !important;
    }

    .cn-hero__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
        margin-top: 6px !important;
    }

    .cn-hero__stats div {
        padding: 5px 7px !important;
    }

    .cn-hero__stats dd {
        font-size: 11px !important;
    }
}

/* =========================================================
   DigitalniDom authenticated workbench
   Loaded after component-isolated styles to unify the product.
   ========================================================= */

:root {
    --dd-bg: #edf2ee;
    --dd-surface: #ffffff;
    --dd-surface-muted: #f5f8f6;
    --dd-surface-strong: #e7eee9;
    --dd-border: #d5dfd8;
    --dd-border-strong: #bdccc2;
    --dd-text: #17211c;
    --dd-muted: #66766e;
    --dd-primary: #1f6d49;
    --dd-primary-dark: #12372a;
    --dd-primary-soft: #e5f2e9;
    --dd-danger: #a93636;
    --dd-danger-soft: #fff4f4;
    --dd-warning: #a76118;
    --dd-warning-soft: #fff7e8;
    --dd-info: #2b65a5;
    --dd-info-soft: #edf5ff;
    --dd-radius: 6px;
    --dd-radius-lg: 8px;
    --dd-shadow: 0 8px 24px rgba(23, 55, 44, .07);
    --dd-shadow-modal: 0 24px 60px rgba(16, 36, 27, .22);
    --md-bg: var(--dd-bg);
    --md-surface: var(--dd-surface);
    --md-surface-2: var(--dd-surface-muted);
    --md-surface-3: var(--dd-surface-strong);
    --md-outline: rgba(23, 55, 44, .12);
    --md-outline-2: rgba(23, 55, 44, .2);
    --md-text: var(--dd-text);
    --md-text-2: var(--dd-muted);
    --md-text-3: #87938d;
    --md-primary: var(--dd-primary);
    --md-primary-weak: var(--dd-primary-soft);
    --md-accent: #27774f;
    --md-accent-weak: #e5f2e9;
    --md-accent-weak-2: #d6eadc;
    --md-shadow-sm: 0 1px 2px rgba(23, 55, 44, .05);
    --md-shadow: var(--dd-shadow);
    --md-shadow-lg: var(--dd-shadow-modal);
    --md-r: var(--dd-radius);
    --md-r-sm: 5px;
    --md-ring: 0 0 0 3px rgba(31, 109, 73, .16);
    --md-ring-green: 0 0 0 3px rgba(31, 109, 73, .16);
    --dt-field-h: 36px;
    --dt-radius: 5px;
    --nh-bg: var(--dd-bg);
    --nh-surface: var(--dd-surface);
    --nh-surface-alt: var(--dd-surface-muted);
    --nh-border: var(--dd-border);
    --nh-text: var(--dd-text);
    --nh-muted: var(--dd-muted);
    --nh-primary: var(--dd-primary);
}

body:has(.shell) {
    margin: 0;
}

.shell,
.shell button,
.shell input,
.shell select,
.shell textarea {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell .content {
    color: var(--dd-text);
    background: var(--dd-bg);
}

.shell .content:has(.nurse-layout) {
    background: var(--dd-bg) !important;
}

.shell .patients-page,
.shell .tasks-page,
.shell .fin-page,
.shell .nh-page,
.shell .help-page,
.shell .carelog-page,
.shell .dash-page,
.shell .control-page,
.shell .rooms-page,
.shell .audit-page {
    gap: 14px;
    color: var(--dd-text);
    background: transparent;
}

.shell h1,
.shell .patients-title,
.shell .tasks-title,
.shell .fin-title,
.shell .control-title {
    color: var(--dd-text);
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: 0;
}

.shell h2,
.shell h3,
.shell h4 {
    letter-spacing: 0;
}

.shell .patients-subtitle,
.shell .tasks-subtitle,
.shell .fin-subtitle,
.shell .control-subtitle {
    color: var(--dd-muted);
    opacity: 1;
}

/* Page headers are work surfaces, not floating cards. */
.shell .patients-header,
.shell .tasks-header,
.shell .fin-header,
.shell .control-header,
.shell .help-header,
.shell .dash-header,
.shell .rooms-header,
.shell .audit-header {
    align-items: center;
    padding: 4px 0 14px;
    border: 0;
    border-bottom: 1px solid var(--dd-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.shell .patients-actions,
.shell .tasks-actions,
.shell .fin-actions,
.shell .control-actions,
.shell .dash-filters {
    display: flex;
    align-items: end;
    gap: 7px;
    flex-wrap: wrap;
}

/* Shared cards and panels. */
.shell .patients-card,
.shell .tasks-card,
.shell .fin-card,
.shell .help-card,
.shell .control-section,
.shell .dash-feed-panel,
.shell .dash-room-focus-panel,
.shell .dash-clinical-panel,
.shell .dash-task-panel,
.shell .carelog-card,
.shell .nh-card {
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius);
    background: var(--dd-surface);
    box-shadow: none;
}

.shell .patients-card:hover,
.shell .tasks-card:hover,
.shell .fin-card:hover,
.shell .help-card:hover {
    box-shadow: none;
}

/* Common command buttons. */
.shell .patients-btn,
.shell .tasks-btn,
.shell .fin-btn,
.shell .nh-btn,
.shell .fp-btn,
.shell .carelog-btn,
.shell .ch-btn,
.shell .nt-header-btn,
.shell .dash-btn,
.shell .control-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--dd-border-strong);
    border-radius: 5px;
    color: #3b4e44;
    background: #fff;
    box-shadow: none;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    transition: color .14s ease, border-color .14s ease, background .14s ease;
}

.shell .rooms-btn,
.shell .audit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--dd-border-strong);
    border-radius: 5px;
    color: #3b4e44;
    background: #fff;
    box-shadow: none;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    transition: color .14s ease, border-color .14s ease, background .14s ease;
}

.shell .patients-btn:hover:not(:disabled),
.shell .tasks-btn:hover:not(:disabled),
.shell .fin-btn:hover:not(:disabled),
.shell .nh-btn:hover:not(:disabled),
.shell .fp-btn:hover:not(:disabled),
.shell .carelog-btn:hover:not(:disabled),
.shell .ch-btn:hover:not(:disabled),
.shell .nt-header-btn:hover:not(:disabled),
.shell .dash-btn:hover:not(:disabled) {
    color: #174f37;
    border-color: #9ebaaa;
    background: #f3f8f5;
    box-shadow: none;
    transform: none;
}

.shell .patients-btn--primary,
.shell .tasks-btn--primary,
.shell .fin-btn--primary,
.shell .nh-btn--primary,
.shell .fp-btn--primary,
.shell .carelog-btn--primary,
.shell .ch-btn--primary,
.shell .dash-btn--primary,
.shell .nt-header-btn--success {
    color: #fff;
    border-color: var(--dd-primary-dark);
    background: var(--dd-primary-dark);
    box-shadow: none;
}

.shell .rooms-btn--primary,
.shell .audit-btn--primary {
    color: #fff;
    border-color: var(--dd-primary-dark);
    background: var(--dd-primary-dark);
}

.shell .patients-btn--primary:hover:not(:disabled),
.shell .tasks-btn--primary:hover:not(:disabled),
.shell .fin-btn--primary:hover:not(:disabled),
.shell .nh-btn--primary:hover:not(:disabled),
.shell .dash-btn--primary:hover:not(:disabled) {
    color: #fff;
    border-color: #285744;
    background: #285744;
}

.shell .patients-btn--danger,
.shell .tasks-btn--danger,
.shell .fin-btn--danger,
.shell .nh-btn--danger,
.shell .carelog-btn--danger {
    color: var(--dd-danger);
    border-color: #e4c1c1;
    background: var(--dd-danger-soft);
}

.shell button:focus-visible,
.shell a:focus-visible,
.shell input:focus-visible,
.shell select:focus-visible,
.shell textarea:focus-visible {
    outline: 0;
    box-shadow: var(--md-ring);
}

/* Inputs stay dense and predictable. */
.shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.shell select,
.shell textarea,
.shell .patients-input,
.shell .patients-textarea,
.shell .tasks-input,
.shell .fin-input,
.shell .nh-input,
.shell .application-input,
.shell .dash-select,
.shell .fp-select {
    box-sizing: border-box;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid var(--dd-border);
    border-radius: 5px;
    outline: 0;
    color: var(--dd-text);
    background-color: #fff;
    background-image: none;
    box-shadow: none;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0;
    transform: none;
}

.shell textarea,
.shell .patients-textarea {
    line-height: 1.45;
}

.shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
.shell select:hover,
.shell textarea:hover {
    border-color: var(--dd-border-strong);
    transform: none;
}

.shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.shell select:focus,
.shell textarea:focus {
    border-color: #77a78d;
    box-shadow: var(--md-ring);
    transform: none;
}

.shell .patients-field > span,
.shell .tasks-field > span,
.shell .fin-field > span,
.shell .nh-field > span,
.shell .ch-field > span {
    color: #586a60;
    font-size: 10px;
    font-weight: 850;
    opacity: 1;
}

.shell input[type="checkbox"],
.shell input[type="radio"] {
    accent-color: var(--dd-primary);
}

/* Tables and dense lists. */
.shell .patients-card:has(> table),
.shell .tasks-card:has(> table),
.shell .fin-card:has(> table) {
    overflow-x: auto;
}

.shell .patients-table,
.shell .tasks-table,
.shell .fin-table,
.shell .nh-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--dd-text);
    background: #fff;
    font-size: 12px;
}

.shell .care-tasks-page .tasks-table {
    min-width: 1040px;
}

.shell .care-tasks-page .tasks-table .tasks-col-actions {
    width: 156px;
}

.shell .care-tasks-page .tasks-table td.tasks-td-actions {
    display: table-cell;
    width: 156px;
    white-space: nowrap;
}

.shell .care-tasks-page .tasks-table .tasks-td-actions .tasks-btn {
    display: inline-flex;
    margin-right: 3px;
}

.shell .procurement-page .tasks-table {
    min-width: 860px;
}

.shell .contacts-page .tasks-table,
.shell .pharmacy-page .tasks-table,
.shell .daily-reports-page .tasks-table {
    min-width: 900px;
}

.shell .procurement-page .tasks-col-actions,
.shell .contacts-page .tasks-col-actions,
.shell .pharmacy-page .tasks-col-actions,
.shell .daily-reports-page .tasks-col-actions {
    width: auto;
}

.shell .procurement-page td.tasks-td-actions,
.shell .contacts-page td.tasks-td-actions,
.shell .pharmacy-page td.tasks-td-actions,
.shell .daily-reports-page td.tasks-td-actions {
    display: table-cell;
    width: auto;
    white-space: nowrap;
}

.shell .patients-table th,
.shell .tasks-table th,
.shell .fin-table th,
.shell .nh-table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--dd-border);
    color: #617168;
    background: var(--dd-surface-muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.shell .patients-table td,
.shell .tasks-table td,
.shell .fin-table td,
.shell .nh-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e5ebe7;
    vertical-align: middle;
}

.shell .patients-table tbody tr:hover,
.shell .tasks-table tbody tr:hover,
.shell .fin-table tbody tr:hover {
    background: #f6f9f7;
}

.shell .patients-table tbody tr:last-child td,
.shell .tasks-table tbody tr:last-child td,
.shell .fin-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Alerts, pills and source markers. */
.shell .patients-alert,
.shell .tasks-alert,
.shell .fin-alert,
.shell .nh-alert,
.shell .dash-alert {
    padding: 10px 12px;
    border: 1px solid var(--dd-border);
    border-radius: 5px;
    background: #fff;
    box-shadow: none;
    font-size: 12px;
}

.shell .patients-loading,
.shell .tasks-loading,
.shell .fin-loading,
.shell .rooms-loading {
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius);
    background: #fff;
    box-shadow: none;
}

.shell .tasks-toggle {
    border-radius: 5px;
    box-shadow: none;
}

.shell .patients-alert--error,
.shell .tasks-alert--error,
.shell .fin-alert--error,
.shell .nh-alert--error,
.shell .dash-alert--error {
    color: #842f2f;
    border-color: #e5bcbc;
    background: var(--dd-danger-soft);
}

.shell .patients-chip,
.shell .tasks-chip,
.shell .fin-pill,
.shell .nh-chip,
.shell .ch-chip,
.shell .carelog-chip,
.shell .nt-header-date-chip,
.shell .dash-live-pill,
.shell .fp-meta-chip {
    border-radius: 999px;
    box-shadow: none;
    letter-spacing: 0;
}

/* Dialogs. */
.shell .patients-modal-backdrop,
.shell .tasks-modal-backdrop,
.shell .fin-modal-backdrop,
.shell .nh-modal-backdrop {
    background: rgba(13, 30, 22, .48);
    backdrop-filter: blur(2px);
}

.shell .patients-modal,
.shell .tasks-modal,
.shell .fin-modal,
.shell .nh-modal {
    border: 1px solid var(--dd-border-strong);
    border-radius: var(--dd-radius-lg);
    background: #fff;
    box-shadow: var(--dd-shadow-modal);
}

.shell .patients-modal-head,
.shell .tasks-modal-head,
.shell .fin-modal-head,
.shell .nh-modal-head {
    border-bottom: 1px solid var(--dd-border);
    background: #fff;
}

.shell .patients-modal-close,
.shell .tasks-modal-close,
.shell .fin-modal-close,
.shell .nh-modal-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--dd-border);
    border-radius: 5px;
    background: #fff;
}

/* Patient card tabs and official records. */
.shell .patients-page .patients-card[style*="padding:16px"] {
    padding: 14px !important;
}

.shell .patients-page .patients-card [style*="border-radius:10px"] {
    border-radius: 5px !important;
}

.shell .source-panel,
.shell .source-field {
    border-radius: 5px;
    box-shadow: none;
}

.shell .source-actions button,
.shell .source-mini-btn {
    border-radius: 5px;
}

.shell .source-badge {
    letter-spacing: 0;
}

/* Dashboard uses status color, but not marketing-card composition. */
.shell .dash-main {
    gap: 14px;
}

.shell .dash-header h1 {
    font-size: 22px;
}

.shell .dash-header p {
    max-width: 760px;
    color: var(--dd-muted);
    font-size: 12px;
    line-height: 1.5;
}

.shell .dash-eyebrow {
    color: var(--dd-primary);
    font-size: 9px;
    letter-spacing: 0;
}

.shell .dash-kpi-grid,
.shell .dash-mini-grid {
    gap: 8px;
}

.shell .dash-stat,
.shell .dash-mini-card {
    border: 1px solid var(--dd-border);
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
}

.shell .dash-stat {
    min-height: 118px;
    padding: 15px;
    color: var(--dd-text);
    text-align: left;
}

.shell .dash-stat:hover {
    border-color: var(--dd-border-strong);
    box-shadow: none;
    transform: none;
}

.shell .dash-stat::after {
    display: none;
}

.shell .dash-stat--cyan,
.shell .dash-stat--green,
.shell .dash-stat--orange,
.shell .dash-stat--red {
    background: #fff;
}

.shell .dash-stat--cyan {
    border-top: 3px solid #2f83a4;
}

.shell .dash-stat--green {
    border-top: 3px solid #2c875a;
}

.shell .dash-stat--orange {
    border-top: 3px solid #c07a26;
}

.shell .dash-stat--red {
    border-top: 3px solid #b94a4a;
}

.shell .dash-stat-number {
    color: var(--dd-text);
    font-size: 28px;
    letter-spacing: 0;
}

.shell .dash-stat-label {
    color: var(--dd-muted);
}

.shell .dash-stat-link {
    color: var(--dd-primary);
    letter-spacing: 0;
    text-transform: none;
}

.shell .dash-stat-icon,
.shell .dash-mini-icon,
.shell .dash-feed-icon {
    border-radius: 5px;
}

.shell .dash-stat--cyan .dash-stat-icon {
    color: #2f83a4;
}

.shell .dash-stat--green .dash-stat-icon {
    color: #2c875a;
}

.shell .dash-stat--orange .dash-stat-icon {
    color: #c07a26;
}

.shell .dash-stat--red .dash-stat-icon {
    color: #b94a4a;
}

.shell .dash-stat-icon {
    font-size: 36px;
    opacity: .22;
}

.shell .dash-feed-panel,
.shell .dash-room-focus-panel,
.shell .dash-clinical-panel,
.shell .dash-task-panel {
    overflow: hidden;
}

.shell .dash-feed-head,
.shell .dash-room-focus-head,
.shell .dash-panel-head {
    border-bottom: 1px solid var(--dd-border);
    background: var(--dd-surface-muted);
}

.shell .dash-feed-item {
    border-radius: 5px;
    box-shadow: none;
}

/* Finance and settings. */
.shell .fin-grid2 {
    gap: 10px;
}

.shell .fin-card {
    padding: 15px;
}

.shell .fin-card-head {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--dd-border);
}

.shell .fin-card-title {
    color: var(--dd-text);
    font-size: 13px;
}

.shell .fin-row {
    border-bottom-color: #e4ebe6;
    font-size: 12px;
}

/* Control panel and help. */
.shell .control-section {
    padding: 0;
    overflow: hidden;
}

.shell .control-section__head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--dd-border);
    background: var(--dd-surface-muted);
}

.shell .control-grid {
    gap: 1px;
    padding: 0;
    background: var(--dd-border);
}

.shell .control-card {
    min-height: 116px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 0;
    border-radius: 0;
    color: var(--dd-text);
    background: #fff;
    box-shadow: none;
    text-align: left;
    cursor: pointer;
}

.shell .control-card:hover {
    background: #f5f9f6;
    box-shadow: none;
    transform: none;
}

.shell .control-card__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 5px;
    color: var(--dd-primary);
    background: var(--dd-primary-soft);
}

.shell .control-card__icon .bi {
    font-size: 17px;
}

.shell .control-card__body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.shell .control-card__eyebrow {
    color: var(--dd-info);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.shell .control-card__title {
    color: var(--dd-text);
    font-size: 13px;
    font-weight: 900;
}

.shell .control-card__text {
    color: var(--dd-muted);
    font-size: 11px;
    line-height: 1.4;
}

.shell .control-card__chev {
    color: #84928b;
}

/* Shared help system. These pages are separate Razor components, so the
   styles must be global instead of isolated to HelpCenter. */
.shell .help-page {
    max-width: 1180px;
    margin: 0 auto;
}

.shell .help-header--nurse {
    color: var(--dd-text);
    background: transparent;
}

.shell .help-kicker {
    margin: 0 0 6px;
    color: var(--dd-primary);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.shell .help-header h1 {
    margin: 0;
    color: var(--dd-text);
    font-size: 22px;
    line-height: 1.2;
}

.shell .help-header p:last-child {
    max-width: 820px;
    margin: 6px 0 0;
    color: var(--dd-muted);
    font-size: 12px;
    line-height: 1.55;
}

.shell .help-toc {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius);
    background: #fff;
    box-shadow: none;
}

.shell .help-toc__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 8px;
    color: var(--dd-muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.shell .help-toc a {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid var(--dd-border);
    border-radius: 5px;
    color: #285a42;
    background: var(--dd-surface-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}

.shell .help-toc a:hover {
    border-color: #a8c5b4;
    color: #174f37;
    background: var(--dd-primary-soft);
}

.shell .help-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius);
    background: #fff;
    box-shadow: none;
    scroll-margin-top: 16px;
}

.shell .help-section__head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--dd-border);
}

.shell .help-step {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 5px;
    color: var(--dd-primary);
    background: var(--dd-primary-soft);
    font-size: 12px;
    font-weight: 900;
}

.shell .help-section h2,
.shell .help-section h3 {
    margin: 0;
    color: var(--dd-text);
    letter-spacing: 0;
}

.shell .help-section h2 {
    font-size: 17px;
}

.shell .help-section h3 {
    font-size: 13px;
}

.shell .help-section__head p {
    margin: 4px 0 0;
    color: var(--dd-muted);
    font-size: 12px;
    line-height: 1.45;
}

.shell .help-flow,
.shell .help-grid,
.shell .help-do-dont {
    display: grid;
    gap: 10px;
}

.shell .help-flow {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.shell .help-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.shell .help-grid--wide {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.shell .help-do-dont {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.shell .help-flow__item,
.shell .help-card,
.shell .help-do-dont > div {
    padding: 13px;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius);
    background: var(--dd-surface-muted);
    box-shadow: none;
}

.shell .help-flow__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shell .help-link-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    transition: border-color .14s ease, background .14s ease;
}

.shell .help-link-card:hover {
    border-color: #a8c5b4;
    background: #f2f7f4;
    box-shadow: none;
    transform: none;
}

.shell .help-flow__item span,
.shell .help-card p,
.shell .help-card li,
.shell .help-do-dont p,
.shell .help-checklist li,
.shell .help-faq p,
.shell .help-link-card span {
    color: var(--dd-muted);
    font-size: 12px;
    line-height: 1.52;
}

.shell .help-card ul,
.shell .help-card ol {
    margin: 9px 0 0;
    padding-left: 19px;
}

.shell .help-card li + li,
.shell .help-checklist li + li {
    margin-top: 5px;
}

.shell .help-note {
    padding: 11px 12px;
    border: 1px solid #c8d9e9;
    border-radius: var(--dd-radius);
    color: #315779;
    background: var(--dd-info-soft);
    box-shadow: none;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.shell .help-checklist {
    margin: 0;
    padding-left: 21px;
}

.shell .help-faq {
    display: grid;
    gap: 8px;
}

.shell .help-faq details {
    padding: 11px 12px;
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius);
    background: var(--dd-surface-muted);
    box-shadow: none;
}

.shell .help-faq summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 850;
}

.shell .help-faq p {
    margin: 8px 0 0;
}

/* Rooms use the same compact administrative language as other settings pages. */
.shell .rooms-card,
.shell .rooms-alert,
.shell .rooms-summary > div,
.shell .rooms-room,
.shell .rooms-empty {
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius);
    background: #fff;
    box-shadow: none;
}

.shell .rooms-room__meta div {
    border-radius: 5px;
    background: var(--dd-surface-muted);
}

.shell .rooms-modal {
    border: 1px solid var(--dd-border-strong);
    border-radius: var(--dd-radius-lg);
    box-shadow: var(--dd-shadow-modal);
}

.shell .rooms-modal-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 5px;
}

.shell .rooms-input {
    border-radius: 5px;
}

/* Audit log remains visually quiet so security events stay easy to scan. */
.shell .audit-notice,
.shell .audit-error,
.shell .audit-filters,
.shell .audit-results {
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius);
    box-shadow: none;
}

.shell .audit-filters {
    background: #fff;
}

.shell .audit-filters input,
.shell .audit-filters select {
    min-height: 36px;
    border-radius: 5px;
}

.shell .audit-btn--icon {
    width: 36px;
    padding: 0;
}

.shell .audit-header > .audit-btn {
    align-self: center;
}

.shell .audit-results__head {
    background: var(--dd-surface-muted);
}

.shell .audit-action,
.shell .audit-change {
    border-radius: 5px;
}

/* Kitchen is a focused workspace, but it still belongs to the same product. */
.shell .kitchen-layout {
    --primary: var(--dd-primary-dark);
    --primary-light: var(--dd-primary-soft);
    --text-main: var(--dd-text);
    --text-sec: var(--dd-muted);
    --bg-app: transparent;
    --bg-card: #fff;
    --border: var(--dd-border);
    --radius: var(--dd-radius);
    --shadow-card: none;
    max-width: 1000px;
    color: var(--dd-text);
    background: transparent;
}

.shell .ch-info,
.shell .ch-panel,
.shell .ch-card,
.shell .ch-table-wrap {
    border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius);
    background: #fff;
    box-shadow: none;
}

.shell .ch-info-ico {
    border-radius: 5px;
    color: var(--dd-primary);
    background: var(--dd-primary-soft);
}

.shell .ch-btn--primary {
    color: #fff !important;
    border-color: var(--dd-primary-dark) !important;
    background: var(--dd-primary-dark) !important;
}

.shell .ch-btn--dark {
    color: #fff !important;
    border-color: #2f4c40 !important;
    background: #2f4c40 !important;
}

.shell .ch-date-input,
.shell .ch-textarea,
.shell .carelog-input {
    border-radius: 5px;
    background-color: #fff;
    background-image: none;
    box-shadow: none;
}

/* Floor plan keeps its domain visualization but joins the shell. */
.shell .fp-page {
    padding: 0;
    color: var(--dd-text);
    background: transparent;
}

.shell .fp-canvas-shell {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.shell .fp-floor-card,
.shell .fp-drawer {
    border-color: var(--dd-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
}

.shell .fp-header {
    border-bottom-color: #285043;
    color: #fff;
    background: #17372c;
}

.shell .fp-tabs {
    padding: 4px;
    border: 1px solid var(--dd-border);
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
}

/* Nurse workspaces remain touch-friendly while using the same surfaces. */
.shell .nurse-layout,
.shell .carelog-page {
    color: var(--dd-text);
    background: transparent;
}

.shell .nt-segmented-nav {
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--dd-border);
    border-radius: 6px;
    background: var(--dd-surface-muted);
    box-shadow: none;
}

.shell .nt-nav-item {
    min-height: 34px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--dd-muted);
    background: transparent;
    box-shadow: none;
}

.shell .nt-nav-item.active {
    color: #174f37;
    border-color: #b7cdbf;
    background: #fff;
    box-shadow: none;
}

@media (max-width: 1450px) {
    .shell .topbar__center .nt-nav-item > span:not(.nt-nav-badge) {
        display: none;
    }

    .shell .topbar__center .nt-nav-item {
        width: 36px;
        flex: 0 0 36px;
        justify-content: center;
        padding: 6px;
    }
}

.shell .carelog-header,
.shell .nh-header {
    border: 1px solid var(--dd-border);
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
}

.shell .nurse-layout .carelog-header,
.shell .nurse-layout .carelog-room-group,
.shell .nurse-layout .carelog-patient-card,
.shell .nurse-layout .carelog-section-card {
    border: 1px solid var(--dd-border) !important;
    border-radius: 6px !important;
    background: #fff !important;
    box-shadow: none !important;
    backdrop-filter: none;
}

.shell .nurse-layout .carelog-header--command {
    grid-template-columns: minmax(250px, .75fr) minmax(520px, 1.25fr) !important;
    gap: 16px !important;
    padding: 16px !important;
}

.shell .nurse-layout .carelog-title {
    color: var(--dd-text) !important;
    font-size: 21px !important;
    letter-spacing: 0 !important;
}

.shell .nurse-layout .carelog-subtitle {
    margin-top: 6px !important;
    color: var(--dd-muted) !important;
    font-size: 12px !important;
}

.shell .nurse-layout .carelog-segmented {
    padding: 3px;
    border: 1px solid var(--dd-border);
    border-radius: 5px;
    background: var(--dd-surface-muted);
    box-shadow: none;
}

.shell .nurse-layout .carelog-segmented .carelog-btn {
    border-radius: 4px;
}

.shell .nurse-layout .carelog-groups {
    gap: 10px;
}

.shell .nurse-layout .carelog-room-head {
    min-height: 56px;
    padding: 11px 14px;
    background: #fff !important;
}

.shell .nurse-layout .carelog-room-head:hover {
    background: #f5f9f6 !important;
}

.shell .nurse-layout .carelog-room-title {
    font-size: 16px;
    letter-spacing: 0;
}

.shell .nurse-layout .carelog-room-icon,
.shell .nurse-layout .carelog-room-chevron {
    border-radius: 5px;
}

.shell .home-top-tabs {
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--dd-border);
    border-radius: 6px;
    background: var(--dd-surface-muted);
    box-shadow: none;
}

.shell .home-top-tabs__item {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--dd-muted);
    background: transparent;
    box-shadow: none;
}

.shell .home-top-tabs__item.is-active {
    color: #174f37;
    border-color: #b7cdbf;
    background: #fff;
    box-shadow: none;
}

@media (max-width: 1180px) {
    .shell .nurse-layout .carelog-header--command {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

@media (max-width: 900px) {
    .shell .patients-header,
    .shell .tasks-header,
    .shell .fin-header,
    .shell .control-header,
    .shell .help-header,
    .shell .dash-header,
    .shell .rooms-header,
    .shell .audit-header {
        align-items: stretch;
    }

    .shell .patients-actions,
    .shell .tasks-actions,
    .shell .fin-actions,
    .shell .dash-filters,
    .shell .rooms-actions {
        width: 100%;
    }

    .shell .patients-actions > label:first-child,
    .shell .tasks-actions > label:first-child {
        flex: 1 1 240px;
    }
}

@media (max-width: 640px) {
    .shell h1,
    .shell .patients-title,
    .shell .tasks-title,
    .shell .fin-title,
    .shell .control-title {
        font-size: 20px;
    }

    .shell .patients-header,
    .shell .tasks-header,
    .shell .fin-header,
    .shell .control-header,
    .shell .help-header,
    .shell .dash-header,
    .shell .rooms-header,
    .shell .audit-header {
        padding-bottom: 11px;
    }

    .shell .patients-actions,
    .shell .tasks-actions,
    .shell .fin-actions {
        gap: 6px;
    }

    .shell .patients-actions .patients-input,
    .shell .tasks-actions .tasks-input {
        min-width: 0 !important;
        width: 100%;
    }

    .shell .patients-btn,
    .shell .tasks-btn,
    .shell .fin-btn,
    .shell .nh-btn,
    .shell .carelog-btn,
    .shell .rooms-btn,
    .shell .audit-btn {
        min-height: 38px;
    }

    .shell .dash-kpi-grid,
    .shell .dash-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shell .dash-stat {
        min-height: 108px;
    }

    .shell .control-grid {
        grid-template-columns: 1fr;
    }

    .shell .help-toc__label {
        grid-column: 1 / -1;
        min-height: 24px;
        padding: 0 3px;
    }

    .shell .help-toc {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shell .help-toc a {
        justify-content: center;
        min-width: 0;
        text-align: center;
    }

    .shell .help-section {
        padding: 12px;
    }

    .shell .rooms-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .shell .rooms-summary > div {
        min-width: 0;
        padding: 10px;
    }

    .shell .rooms-summary strong {
        font-size: 20px;
    }

    .shell .audit-header > .audit-btn {
        align-self: flex-start;
    }
}
