/* ==========================================================================
   Down Community Care — premium light-blue dashboard theme
   Spec: match supplied reference dashboard as closely as possible
   ========================================================================== */

:root {
    --ohc-bg: #dceaf7;
    --ohc-surface: #f7fbff;
    --ohc-surface-2: #eef5fc;
    --ohc-text: #173553;
    --ohc-muted: #6b8299;
    --ohc-accent: #1f7fe0;
    --ohc-accent-hover: #1565c0;
    --ohc-accent-muted: rgba(31, 127, 224, 0.14);
    --ohc-border: rgba(21, 101, 192, 0.14);
    --ohc-radius: 0.95rem;
    --ohc-scrollbar: #cfe0ef;
    --ohc-scrollbar-thumb: #8fb0cc;
    --ohc-sidebar-width: 15.75rem;
    --dcc-sidebar-top: #0a3a7a;
    --dcc-sidebar-mid: #082f62;
    --dcc-sidebar-bot: #061f45;
    --dcc-heading: #0b3d78;
    --dcc-card-border: rgba(255, 255, 255, 0.85);
    --dcc-card-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 10px 28px rgba(11, 61, 120, 0.10),
        0 2px 6px rgba(11, 61, 120, 0.05);
    --dcc-card-grad: linear-gradient(165deg, #ffffff 0%, #f3f8fd 48%, #e8f1fa 100%);
}

html { color-scheme: light; }

body {
    background:
        radial-gradient(ellipse 80% 50% at 100% -10%, rgba(64, 156, 255, 0.22), transparent 55%),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(21, 101, 192, 0.10), transparent 50%),
        linear-gradient(180deg, #cfe3f5 0%, #dceaf7 28%, #e8f1f8 100%);
    color: var(--ohc-text);
    font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ohc-accent); }
a:hover { color: var(--ohc-accent-hover); }

/* ---------- Cards / surfaces ---------- */
.card,
.settings-panel,
.dash-panel,
.dash-kpi-card {
    background: var(--dcc-card-grad);
    border: 1px solid var(--dcc-card-border);
    box-shadow: var(--dcc-card-shadow);
    color: var(--ohc-text);
    border-radius: var(--ohc-radius);
}

.form-control,
.form-select {
    background: linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
    border: 1px solid rgba(21, 101, 192, 0.18);
    color: var(--ohc-text);
    border-radius: 0.65rem;
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset;
}

.form-control:focus,
.form-select:focus {
    background: #fff;
    border-color: #42a5f5;
    box-shadow: 0 0 0 0.18rem rgba(31, 127, 224, 0.18);
    color: var(--ohc-text);
}

.btn-primary {
    background: linear-gradient(180deg, #4aa3f0 0%, #1f7fe0 55%, #1565c0 100%);
    border-color: #1565c0;
    color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 8px 16px rgba(21, 101, 192, 0.28);
    border-radius: 0.65rem;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(180deg, #1f7fe0 0%, #1565c0 100%);
    border-color: #0d47a1;
    color: #fff;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.38);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 0.55rem;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.app-content .btn-outline-light,
.settings-panel .btn-outline-light,
.modal .btn-outline-light {
    border-color: rgba(21, 101, 192, 0.2);
    color: var(--ohc-text);
    background: linear-gradient(180deg, #fff, #f3f8fd);
    box-shadow: 0 1px 0 #fff inset, 0 2px 6px rgba(11,61,120,0.06);
}

.app-content .btn-outline-light:hover,
.settings-panel .btn-outline-light:hover,
.modal .btn-outline-light:hover {
    border-color: var(--ohc-accent);
    color: var(--ohc-text);
    background: #eef5fc;
}

/* ---------- Login ---------- */
.login-brand {
    background:
        linear-gradient(165deg, #0a4d96 0%, #0b3d78 48%, #082f5c 100%);
    border-radius: 1rem;
    padding: 1rem 1.1rem 0.95rem;
    margin: 0 auto 0.35rem;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.18) inset,
        0 10px 22px rgba(8, 47, 104, 0.22);
}

.login-brand .login-logo {
    margin-bottom: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 10, 40, 0.35));
}

.login-page {
    background:
        radial-gradient(circle at 85% 10%, rgba(66, 165, 245, 0.35), transparent 42%),
        linear-gradient(155deg, #072f68 0%, #0a3f8a 40%, #1f7fe0 100%);
}

.login-card {
    background: linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 24px 60px rgba(7, 47, 104, 0.35);
    color: var(--ohc-text);
}

.login-page .form-label,
.login-page .text-muted { color: var(--ohc-muted) !important; }

.login-page .btn-outline-light {
    border-color: rgba(21, 101, 192, 0.2);
    color: var(--ohc-text);
    background: #fff;
}

/* ---------- Sidebar ---------- */
.app-sidebar {
    width: var(--ohc-sidebar-width);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 18%),
        linear-gradient(180deg, var(--dcc-sidebar-top) 0%, var(--dcc-sidebar-mid) 42%, var(--dcc-sidebar-bot) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    box-shadow: 8px 0 28px rgba(7, 47, 104, 0.18);
}

.sidebar-brand {
    padding: 0.7rem 0.85rem 0.55rem;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-link,
.brand-link:hover {
    color: #fff;
    justify-content: flex-start;
}

.sidebar-logo {
    width: 100%;
    max-width: 13.4rem;
    height: auto;
    margin: 0;
    display: block;
    filter: drop-shadow(0 3px 8px rgba(0, 20, 60, 0.35));
}

.sidebar-nav {
    padding: 0.35rem 0.4rem 0.55rem;
    gap: 0;
}

.sidebar-nav .nav-link,
.offcanvas .nav-link {
    color: rgba(255, 255, 255, 0.94);
    border-radius: 0.5rem;
    padding: 0.34rem 0.55rem;
    margin: 0.02rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.nav-icon {
    color: rgba(255, 255, 255, 0.88);
    width: 1.05rem;
    height: 1.05rem;
}

.nav-icon svg {
    width: 1.05rem;
    height: 1.05rem;
    opacity: 0.95;
}

.sidebar-nav .nav-link:hover,
.offcanvas .nav-link:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}

.sidebar-nav .nav-link.active,
.offcanvas .nav-link.active {
    background: linear-gradient(90deg, rgba(110, 185, 255, 0.34) 0%, rgba(66, 165, 245, 0.18) 100%);
    color: #fff;
    font-weight: 650;
    box-shadow:
        inset 3px 0 0 #9ad0ff,
        0 1px 0 rgba(255,255,255,0.12) inset,
        0 6px 14px rgba(0,0,0,0.12);
}

.sidebar-nav .nav-link.active .nav-icon,
.offcanvas .nav-link.active .nav-icon {
    color: #eaf5ff;
}

.sidebar-system-label {
    margin: 0.2rem 0.15rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d7e8fb !important;
}

.sidebar-footer {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16) !important;
    padding: 0.75rem 0.75rem 0.9rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.18));
}

.sidebar-footer .sidebar-user-name {
    font-weight: 700;
    font-size: 0.86rem;
    color: #ffffff !important;
}

.sidebar-footer .text-muted,
.sidebar-user-name + .text-muted {
    color: #cfe3f8 !important;
    opacity: 1 !important;
}

.sidebar-footer .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.42);
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08);
}

/* ---------- Topbar / main ---------- */
.app-topbar,
.mobile-topbar {
    background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(241,247,253,0.88) 100%);
    backdrop-filter: blur(14px);
    border-bottom-color: rgba(21, 101, 192, 0.1) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset;
}

.topbar-heading {
    color: var(--dcc-heading);
    font-weight: 750;
    letter-spacing: -0.02em;
    font-size: 1.45rem;
}

.topbar-subheading { color: var(--ohc-muted) !important; font-size: 0.84rem; }
.topbar-user strong { color: var(--ohc-text); }

.topbar-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.28rem 0.65rem 0.28rem 0.28rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #e8f2fb 100%);
    border: 1px solid rgba(21, 101, 192, 0.14);
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 4px 10px rgba(11,61,120,0.08);
}

.topbar-user-avatar {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #64b5f6, #1565c0);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(21,101,192,0.28);
}

.topbar-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    padding-right: 0.15rem;
}

.topbar-user-meta strong {
    font-size: 0.78rem;
    color: var(--dcc-heading);
    font-weight: 700;
}

.topbar-user-meta span {
    font-size: 0.68rem;
    color: #6b8299;
}

.app-topbar .btn-outline-light,
.mobile-topbar .btn-outline-light {
    border-color: rgba(21, 101, 192, 0.14);
    color: var(--ohc-text);
    background: linear-gradient(180deg, #fff, #f2f7fc);
}

/*
 * iPhone PWA / notch fix (same as Opus):
 * Home-screen apps draw under the status bar / Dynamic Island.
 * Keep the hamburger menu below it via safe-area padding.
 */
.mobile-topbar {
    padding-top: calc(0.5rem + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: 0.5rem !important;
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px)) !important;
    min-height: calc(3.1rem + env(safe-area-inset-top, 0px)) !important;
}

.mobile-topbar .mobile-menu-btn {
    position: relative;
    z-index: 2;
}

@media (max-width: 767.98px) {
    .mobile-topbar {
        /* Preserve safe-area — do not let the shared app.css shrink-reset win */
        padding-top: calc(0.5rem + env(safe-area-inset-top, 0px)) !important;
        padding-left: max(0.75rem, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(0.75rem, env(safe-area-inset-right, 0px)) !important;
        min-height: calc(3.1rem + env(safe-area-inset-top, 0px)) !important;
    }
}

/* Beat .offcanvas.text-bg-dark { background: var(--ohc-surface) } from app.css */
.offcanvas.text-bg-dark.app-mobile-nav,
.app-mobile-nav.offcanvas,
.app-mobile-nav {
    background:
        linear-gradient(180deg, var(--dcc-sidebar-top) 0%, var(--dcc-sidebar-mid) 42%, var(--dcc-sidebar-bot) 100%) !important;
    color: #fff !important;
}

.app-mobile-nav .offcanvas-header {
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-mobile-nav .offcanvas-body,
.app-mobile-nav .nav-link,
.app-mobile-nav .nav-icon,
.app-mobile-nav .small {
    color: rgba(255, 255, 255, 0.94) !important;
}

.app-mobile-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

.app-mobile-nav .nav-link.active {
    background: linear-gradient(180deg, rgba(100, 181, 246, 0.28), rgba(30, 136, 229, 0.18)) !important;
    color: #fff !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.app-mobile-nav .nav-link.active .nav-icon {
    color: #fff !important;
}

.app-mobile-nav .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.9;
}
.app-footer { color: var(--ohc-muted) !important; }
.app-content { background: transparent; }

/* Login PWA install button (white card) — sits above To install instructions */
.login-page #pwa-install-btn,
.login-page .login-install-btn {
    border-color: rgba(21, 101, 192, 0.22);
    color: var(--dcc-heading);
    background: linear-gradient(180deg, #ffffff 0%, #e8f2fb 100%);
    box-shadow: 0 1px 0 #fff inset, 0 6px 14px rgba(11,61,120,0.1);
    font-weight: 650;
    margin-top: 0.15rem;
}

.login-page #pwa-install-btn:hover,
.login-page .login-install-btn:hover {
    border-color: #1e88e5;
    color: var(--dcc-heading);
    background: #eef5fc;
}

.login-page .login-install-hint {
    margin-top: 0.55rem;
}

@media (min-width: 992px) {
    .has-sidebar .app-main { margin-left: var(--ohc-sidebar-width); }
}

/* ---------- Dashboard layout ---------- */
.dash-preview {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.dash-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 0;
}

.dash-kpi-row.has-on-hold {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.7rem;
}

/* Override Opus has-on-hold shrink rules so icons stay balanced in-card */
.dash-kpi-row.has-on-hold .dash-kpi-card {
    gap: 0.7rem;
    padding: 0.75rem 0.95rem 0.75rem 1.05rem;
}

.dash-kpi-row.has-on-hold .dash-kpi-icon,
.dash-kpi-row.has-on-hold .dash-kpi-icon.dash-kpi-icon-hold {
    width: 3.35rem !important;
    height: 3.35rem !important;
}

.dash-kpi-row.has-on-hold .dash-kpi-icon img {
    width: 3.35rem !important;
    height: 3.35rem !important;
}

.dash-kpi-row.has-on-hold .dash-kpi-value {
    font-size: 1.55rem;
}

.dash-on-hold-card {
    /* Match the other KPI cards — no yellow tint */
    border-color: rgba(255,255,255,0.92) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.97) 0%, rgba(226,239,251,0.96) 42%, rgba(201,225,246,0.94) 100%) !important;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.98) inset,
        0 0 0 1px rgba(21, 101, 192, 0.05),
        0 12px 26px rgba(11, 61, 120, 0.12),
        0 2px 4px rgba(11, 61, 120, 0.05) !important;
}

.dash-kpi-icon-hold {
    background: transparent !important;
    box-shadow: none !important;
}

.dash-kpi-icon-hold img {
    filter: drop-shadow(0 10px 16px rgba(11, 61, 120, 0.28));
}

.dash-trend-gold {
    color: #6b8299 !important;
    font-weight: 500;
}

button.dash-kpi-link.dash-on-hold-card {
    appearance: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    width: 100%;
}

.dash-kpi-card {
    padding: 0.75rem 0.95rem 0.75rem 1.05rem;
    border-radius: 1rem;
    gap: 0.7rem;
    min-width: 0;
    align-items: center;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.97) 0%, rgba(226,239,251,0.96) 42%, rgba(201,225,246,0.94) 100%);
    border: 1px solid rgba(255,255,255,0.92);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.98) inset,
        0 0 0 1px rgba(21, 101, 192, 0.05),
        0 12px 26px rgba(11, 61, 120, 0.12),
        0 2px 4px rgba(11, 61, 120, 0.05);
}

.dash-kpi-card .dash-kpi-label {
    font-size: 0.72rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 650;
    color: #58748f;
    margin-bottom: 0.05rem;
}

.dash-kpi-card .dash-kpi-value {
    font-size: 1.55rem;
    font-weight: 750;
    color: var(--dcc-heading);
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.dash-kpi-card .dash-kpi-trend {
    font-size: 0.7rem;
    line-height: 1.25;
    color: #6b8299;
    font-weight: 500;
}

.dash-kpi-icon {
    /* Artwork already includes the glossy tile — keep the shell transparent */
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-kpi-icon img {
    width: 3.35rem;
    height: 3.35rem;
    display: block;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    filter: drop-shadow(0 6px 10px rgba(11, 61, 120, 0.22));
}

.dash-kpi-icon-alert {
    background: transparent !important;
    box-shadow: none;
}

.dash-kpi-icon-alert img {
    filter: drop-shadow(0 6px 10px rgba(183, 28, 90, 0.22));
}

@media (max-width: 1199.98px) {
    .dash-kpi-row,
    .dash-kpi-row.has-on-hold {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-kpi-row .dash-on-hold-card {
        grid-column: 1 / -1; /* full / double width on small screens */
    }
}

@media (max-width: 767.98px) {
    .dash-kpi-row,
    .dash-kpi-row.has-on-hold {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-kpi-row .dash-on-hold-card {
        grid-column: 1 / -1;
    }
}

.dash-panel {
    border-radius: 1rem;
    padding: 0.8rem 0.9rem;
    background:
        linear-gradient(165deg, rgba(255,255,255,0.96) 0%, rgba(236,245,253,0.95) 52%, rgba(220,236,249,0.94) 100%);
    min-height: 0 !important;
}

.dash-grid-2 > .dash-panel {
    min-height: 0 !important;
    padding-bottom: 0.75rem;
}

.dash-panel-title,
.content-panel-title {
    color: var(--dcc-heading);
    font-weight: 750;
    letter-spacing: -0.01em;
    font-size: 0.98rem;
}

/* Donut / legend */
.dash-chart-row {
    gap: 0.9rem;
    align-items: center;
    margin-top: 0.2rem;
    margin-bottom: 0;
}

.dash-donut {
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    box-shadow:
        0 0 0 5px rgba(255,255,255,0.7),
        0 10px 22px rgba(11,61,120,0.14),
        inset 0 0 0 1px rgba(255,255,255,0.35);
}

.dash-donut-hole {
    position: absolute;
    inset: 20%;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #eef5fc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 6px rgba(11,61,120,0.08);
    color: var(--dcc-heading);
}

.dash-donut-total {
    font-weight: 750;
    font-size: 0.92rem;
    text-align: center;
    line-height: 1.15;
}

.dash-legend li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.26rem 0;
    border-bottom: 1px solid rgba(21, 101, 192, 0.08);
    font-size: 0.82rem;
    color: #355872;
    font-weight: 500;
}

.dash-legend li:last-child { border-bottom: 0; }
.dash-legend strong {
    margin-left: auto;
    color: var(--dcc-heading);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.dash-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 2px 4px rgba(0,0,0,0.12);
}

.dash-dot-morning { background: linear-gradient(180deg, #64b5f6, #1e88e5); }
.dash-dot-afternoon { background: linear-gradient(180deg, #81c784, #43a047); }
.dash-dot-tea { background: linear-gradient(180deg, #ffb74d, #fb8c00); }
.dash-dot-evening { background: linear-gradient(180deg, #ba68c8, #8e24aa); }

/* Care hours */
.dash-hours-head { margin-bottom: 0.65rem !important; gap: 0.5rem; }

.dash-hours-week .form-select {
    border-radius: 0.7rem;
    border-color: rgba(21, 101, 192, 0.2);
    background: linear-gradient(180deg, #fff, #eef5fc);
    color: var(--dcc-heading);
    font-weight: 600;
}

.dash-hours-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.28rem;
    font-size: 0.84rem;
    font-weight: 650;
    color: #2d4d6b;
}

.dash-hours-row .hrs {
    color: var(--dcc-heading);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.dash-progress-bar {
    background: linear-gradient(180deg, #d5e6f5, #eaf3fb);
    height: 0.68rem;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(11,61,120,0.12);
    margin-bottom: 0.5rem;
}

.dash-progress-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #64b5f6 0%, #1e88e5 55%, #1565c0 100%);
    border-radius: 999px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset;
}

.dash-progress-bar-muted > span {
    background: linear-gradient(90deg, #90caf9, #64b5f6);
}

/* Staff on runs */
.dash-panel-run-staff { padding: 0.8rem 0.85rem 0.55rem; }

.dash-run-staff-head {
    margin-bottom: 0.45rem;
}

.dash-run-staff-mark {
    background: linear-gradient(180deg, rgba(100,181,246,0.25), rgba(30,136,229,0.12));
    color: #1565c0;
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
}

.dash-run-staff-date {
    color: var(--dcc-heading);
    font-weight: 700;
    font-size: 0.86rem;
}

.dash-run-staff-day-btn,
.dash-run-staff-wall {
    border-color: rgba(21, 101, 192, 0.16);
    background: linear-gradient(180deg, #fff, #eef5fc);
    color: var(--dcc-heading);
    border-radius: 0.55rem;
    box-shadow: 0 1px 0 #fff inset;
}

.dash-run-staff-day-btn:hover,
.dash-run-staff-wall:hover {
    border-color: var(--ohc-accent);
    color: var(--ohc-accent);
}

.dash-run-staff {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(236,245,253,0.7));
    border-radius: 0.75rem;
    overflow: hidden;
}

.dash-run-staff thead th {
    background: linear-gradient(180deg, #e8f2fb 0%, #dceaf6 100%);
    color: #3d6285;
    border-bottom: 1px solid rgba(21, 101, 192, 0.12);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.4rem 0.5rem;
}

.dash-run-staff thead th.is-am { color: #1e88e5; }
.dash-run-staff thead th.is-lunch { color: #43a047; }
.dash-run-staff thead th.is-tea { color: #ef6c00; }
.dash-run-staff thead th.is-pm { color: #8e24aa; }

.dash-run-staff th,
.dash-run-staff td,
.dash-run-staff tbody th,
.dash-run-staff tbody td {
    border-bottom: 1px solid rgba(21, 101, 192, 0.08);
    vertical-align: middle;
    padding: 0.2rem 0.45rem;
}

.dash-run-staff .dash-run-name,
.dash-run-staff .dash-run-name a {
    color: var(--dcc-heading);
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.84rem;
}

/* Large screens: divider between Run name and AM */
@media (min-width: 992px) {
    .dash-run-staff thead th:first-child,
    .dash-run-staff tbody .dash-run-name {
        border-right: 1px solid rgba(21, 101, 192, 0.22);
    }
}

.dash-run-staff-names {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem 0.4rem;
    min-width: 0;
}

.dash-run-staff-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    color: #243b53;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    padding: 0.16rem 0.42rem 0.16rem 0.3rem;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(230,241,251,0.95) 100%);
    border: 1px solid rgba(21, 101, 192, 0.14);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.95) inset,
        0 2px 5px rgba(11,61,120,0.06);
}

.dash-run-staff tbody tr:nth-child(even) th,
.dash-run-staff tbody tr:nth-child(even) td {
    background: rgba(214, 232, 248, 0.42);
}

.dash-run-staff tbody tr:nth-child(odd) th,
.dash-run-staff tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.42);
}

.dash-run-staff-dot {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    flex-shrink: 0;
    display: inline-block;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.95);
}

.dash-run-staff td.is-am .dash-run-staff-dot { background: #1e88e5; }
.dash-run-staff td.is-lunch .dash-run-staff-dot { background: #43a047; }
.dash-run-staff td.is-tea .dash-run-staff-dot { background: #fb8c00; }
.dash-run-staff td.is-pm .dash-run-staff-dot { background: #8e24aa; }

/* Mobile: stacked run cards — keep AM/Lunch/Tea/PM labels + row striping inside each card */
@media (max-width: 991.98px) {
    .dash-run-staff tbody {
        gap: 0.65rem;
    }

    .dash-run-staff tbody tr {
        background:
            linear-gradient(165deg, rgba(255,255,255,0.98) 0%, rgba(236,245,253,0.96) 100%) !important;
        border: 1px solid rgba(255,255,255,0.9);
        border-radius: 0.9rem;
        box-shadow:
            0 1px 0 rgba(255,255,255,0.95) inset,
            0 8px 18px rgba(11, 61, 120, 0.08);
        gap: 0;
        padding: 0.55rem 0.55rem 0.45rem;
    }

    /* Don't zebra whole cards — keep every run card the same base */
    .dash-run-staff tbody tr:nth-child(even),
    .dash-run-staff tbody tr:nth-child(odd),
    .dash-run-staff tbody tr:nth-child(even) th,
    .dash-run-staff tbody tr:nth-child(odd) th,
    .dash-run-staff tbody tr:nth-child(even) td,
    .dash-run-staff tbody tr:nth-child(odd) td {
        background: transparent;
    }

    .dash-run-staff .dash-run-name {
        padding: 0.15rem 0.35rem 0.5rem;
        border-bottom: 1px solid rgba(21, 101, 192, 0.1);
        margin-bottom: 0.2rem;
    }

    /* Always show period rows (including empties) so AM/Lunch/Tea/PM stay visible */
    .dash-run-staff tbody td.is-empty {
        display: grid !important;
    }

    .dash-run-staff tbody td {
        margin: 0 -0.15rem;
        padding: 0.42rem 0.45rem !important;
        border-radius: 0.55rem;
        border: 0 !important;
        align-items: center;
    }

    /* Alternate period-row colours inside each run card */
    .dash-run-staff tbody td:nth-of-type(odd) {
        background: rgba(255, 255, 255, 0.55) !important;
    }

    .dash-run-staff tbody td:nth-of-type(even) {
        background: rgba(214, 232, 248, 0.55) !important;
    }

    .dash-run-staff tbody td::before {
        content: attr(data-label);
        color: #3d6285;
        font-size: 0.7rem;
        font-weight: 750;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        padding-top: 0.15rem;
        min-width: 3.4rem;
    }

    .dash-run-staff td.is-am::before { color: #1e88e5; }
    .dash-run-staff td.is-lunch::before { color: #43a047; }
    .dash-run-staff td.is-tea::before { color: #ef6c00; }
    .dash-run-staff td.is-pm::before { color: #8e24aa; }
}

/* Bottom cards */
.dash-grid-2,
.dash-grid-3 { gap: 0.85rem; }

.dash-status-list li {
    color: #2d4d6b;
    font-weight: 550;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(21, 101, 192, 0.08);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-status-list li:last-child { border-bottom: 0; }
.dash-status-list .ms-auto {
    color: var(--dcc-heading);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.dash-open-task.is-highlight {
    margin: 0.15rem 0 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(251, 140, 0, 0.28);
    border-radius: 0.85rem;
    background: linear-gradient(135deg, rgba(255, 243, 224, 0.95), rgba(255, 224, 178, 0.55));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 4px 12px rgba(251, 140, 0, 0.12);
}

.dash-open-task-progress {
    display: grid;
    gap: 0.45rem;
    align-items: stretch;
}

.dash-open-task-progress-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.dash-open-task-link {
    color: #9a4d00;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.25;
}

.dash-open-task-link:hover,
.dash-open-task-link:focus-visible {
    color: #7a3c00;
    text-decoration: underline;
}

.dash-open-task-pct {
    color: #9a4d00 !important;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dash-rota-progress {
    width: 100%;
    height: 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(154, 77, 0, 0.18);
    overflow: hidden;
}

.dash-rota-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffb74d 0%, #fb8c00 55%, #ef6c00 100%);
    box-shadow: 0 0 0 1px rgba(239, 108, 0, 0.08) inset;
    transition: width 0.35s ease;
}

.dash-rota-progress-bar.is-complete {
    background: linear-gradient(90deg, #81c784 0%, #43a047 55%, #2e7d32 100%);
}

.dash-open-task-meta {
    color: #8a5a00;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
}

.dash-open-task-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    height: 1.7rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #ff9800, #ef6c00);
    color: #fff !important;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(239, 108, 0, 0.28);
}

.dash-bottom-icon {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fff, #e3eef9);
    color: #1565c0;
    box-shadow: 0 1px 0 #fff inset, 0 2px 6px rgba(11,61,120,0.08);
    flex-shrink: 0;
}

.dash-bottom-icon svg { width: 0.9rem; height: 0.9rem; }

.settings-tabs .nav-link { color: var(--ohc-muted); border-radius: 999px; }
.settings-tabs .nav-link.active {
    background: linear-gradient(180deg, #42a5f5, #1565c0);
    color: #fff;
    box-shadow: 0 6px 14px rgba(21,101,192,0.25);
}

.modal-content {
    background: linear-gradient(180deg, #fff, #f4f9fd);
    color: var(--ohc-text);
    border: 1px solid var(--ohc-border);
    border-radius: 1rem;
    box-shadow: 0 24px 50px rgba(11,61,120,0.2);
}

.modal-header,
.modal-footer { border-color: var(--ohc-border) !important; }

.btn-close { filter: none; }

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ohc-text);
    --bs-table-border-color: var(--ohc-border);
    --bs-table-hover-bg: rgba(31, 127, 224, 0.06);
}

.alert {
    border: 1px solid transparent;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Light-theme readable flashes (override dark-theme app.css greens). */
.alert-success {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #1b5e20;
}

.alert-danger,
.alert-error {
    background: #fdecea;
    border-color: #f5c2c7;
    color: #842029;
}

.alert-success .btn-close,
.alert-danger .btn-close,
.alert-error .btn-close {
    filter: none;
    opacity: 0.65;
}

.text-muted { color: var(--ohc-muted) !important; }

/* ---------- Clients / Staff directory ---------- */
.dcc-list-page {
    display: grid;
    gap: 0.9rem;
}

.dcc-list-shell {
    padding: 1rem 1.05rem 0.85rem;
}

.dcc-list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.dcc-list-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1 1 22rem;
}

.dcc-run-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
    gap: 0.35rem 0.55rem;
    max-height: 12.5rem;
    overflow: auto;
    padding: 0.7rem 0.8rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(21, 101, 192, 0.14);
    background: linear-gradient(180deg, #fff, #f3f8fd);
}

.dcc-run-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.28rem 0.4rem;
    border-radius: 0.55rem;
    color: #2f5273;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.dcc-run-check:hover {
    background: rgba(21, 101, 192, 0.06);
}

.dcc-run-check input {
    margin: 0;
    accent-color: #1565c0;
}

.dcc-modal-footer .me-auto {
    margin-right: auto !important;
}

.dcc-list-search {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    min-width: min(100%, 40rem);
    flex: 1 1 22rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.dcc-list-search .form-control,
.dcc-list-search .form-select {
    border-radius: 0.7rem;
    border-color: rgba(21, 101, 192, 0.16);
    background: linear-gradient(180deg, #fff, #f4f9fd);
}

.dcc-list-search .form-control {
    max-width: 15rem;
}

.dcc-run-filter {
    max-width: 12.5rem;
    min-width: 10rem;
}

.dcc-check-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff, #eef5fc);
    border: 1px solid rgba(21, 101, 192, 0.14);
    color: #3d6285;
    font-size: 0.78rem;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.dcc-check-filter input {
    margin: 0;
    accent-color: #1565c0;
}

.dcc-chip-btn {
    cursor: pointer;
}

.dcc-chip-btn:hover {
    border-color: rgba(30, 136, 229, 0.45);
    color: #1565c0;
}

.dcc-table-wrap {
    overflow: auto;
    border-radius: 0.9rem;
    border: 1px solid rgba(21, 101, 192, 0.10);
    background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(236,245,253,0.55));
}

.dcc-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 860px;
}

.dcc-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, #e8f2fb 0%, #dceaf6 100%);
    color: #3d6285;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid rgba(21, 101, 192, 0.12);
    white-space: nowrap;
}

.dcc-data-table tbody td {
    padding: 0.38rem 0.75rem;
    border-bottom: 1px solid rgba(21, 101, 192, 0.07);
    vertical-align: middle;
    color: #243b53;
    font-size: 0.9rem;
}

.dcc-data-table tbody tr:nth-child(even) td {
    background: rgba(214, 232, 248, 0.28);
}

.dcc-data-table tbody tr:hover td {
    background: rgba(31, 127, 224, 0.08);
}

.dcc-client-name-btn,
.dcc-staff-name {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--dcc-heading);
    font-weight: 750;
    font-size: 0.98rem;
    letter-spacing: -0.01em;
    text-align: left;
}

.dcc-client-name-btn:hover {
    color: #1e88e5;
    text-decoration: underline;
}

.dcc-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.45rem;
    align-items: center;
    margin-top: 0.08rem;
    font-size: 0.75rem;
}

.dcc-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff, #e7f1fb);
    border: 1px solid rgba(21, 101, 192, 0.14);
    color: #3d6285;
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.03em;
}

.dcc-run-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
}

.dcc-pill {
    display: inline-flex;
    align-items: center;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(230,241,251,0.95));
    border: 1px solid rgba(21, 101, 192, 0.14);
    color: #243b53;
    font-size: 0.72rem;
    font-weight: 650;
}

.dcc-pill.is-more {
    color: #1e88e5;
}

.dcc-plan-status {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.dcc-plan-status.is-confirmed {
    background: rgba(46, 125, 50, 0.12);
    color: #2e7d32;
}

.dcc-plan-status.is-pending {
    background: rgba(21, 101, 192, 0.10);
    color: #1565c0;
}

.dcc-plan-status.is-missing {
    background: rgba(183, 28, 28, 0.08);
    color: #b71c1c;
}

.dcc-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
}

.dcc-careplan-btn {
    border-radius: 999px;
    border: 1px solid rgba(21, 101, 192, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #e8f2fb 100%);
    color: var(--dcc-heading);
    font-weight: 700;
    padding: 0.28rem 0.75rem;
    box-shadow: 0 1px 0 #fff inset, 0 4px 10px rgba(11,61,120,0.08);
}

.dcc-careplan-btn:hover {
    border-color: #1e88e5;
    color: #0b3d78;
    background: #eef5fc;
}

.dcc-col-note {
    min-width: 7.5rem;
    max-width: 12rem;
}

.dcc-note-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(120, 120, 120, 0.22);
    background: #fff;
    color: #5f6368;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.28rem 0.75rem;
    box-shadow: 0 1px 0 #fff inset, 0 3px 8px rgba(0,0,0,0.04);
}

.dcc-note-btn:hover {
    border-color: rgba(183, 110, 0, 0.45);
    color: #8a5a00;
    background: #fff8e8;
}

.dcc-note-btn.has-note {
    border-color: rgba(183, 110, 0, 0.4);
    background: linear-gradient(180deg, #fff9eb 0%, #ffe8b8 100%);
    color: #8a5a00;
}

.dcc-note-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #e67e00;
    box-shadow: 0 0 0 2px rgba(230, 126, 0, 0.18);
    flex: 0 0 auto;
}

.dcc-note-preview {
    margin-top: 0.28rem;
    font-size: 0.75rem;
    line-height: 1.25;
    color: #6b5a3e;
    max-width: 11rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.dcc-note-textarea {
    min-height: 10rem;
    resize: vertical;
}

.dcc-contract-hours {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0b3d78;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin-bottom: 0.15rem;
    font-variant-numeric: tabular-nums;
}

.dcc-col-delete {
    width: 2.1rem;
    padding-left: 0.35rem !important;
    padding-right: 0.15rem !important;
}

.dcc-inline-delete {
    display: inline-flex;
    margin: 0;
}

.dcc-delete-icon-btn {
    border: 0;
    background: transparent;
    color: #b0bec5;
    padding: 0.2rem;
    border-radius: 6px;
    line-height: 0;
    cursor: pointer;
}

.dcc-delete-icon-btn:hover {
    color: #c62828;
    background: rgba(198, 40, 40, 0.08);
}

.dcc-issues-btn {
    border-radius: 999px;
    border: 1px solid rgba(198, 40, 40, 0.35);
    background: linear-gradient(180deg, #ffebee 0%, #ffcdd2 100%);
    color: #b71c1c;
    font-weight: 800;
    box-shadow: 0 1px 0 #fff inset, 0 4px 10px rgba(198, 40, 40, 0.12);
}

.dcc-issues-btn:hover {
    border-color: #c62828;
    color: #7f0000;
    background: #ffcdd2;
}

.dcc-issues-body {
    display: grid;
    gap: 1.35rem;
}

.dcc-issues-section {
    padding-bottom: 0.25rem;
}

.dcc-issues-table th {
    white-space: nowrap;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
}

.dcc-issues-table td {
    vertical-align: top;
}

.dcc-rota-files {
    display: grid;
    gap: 0.75rem;
}

.dcc-rota-file-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--ohc-border, #e2e8f0);
    border-radius: 12px;
    background: #f8fafc;
}

.dcc-rota-file-title {
    font-weight: 800;
    color: #0b3d78;
}

.dcc-rota-file-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.dcc-rota-upload-form {
    margin: 0;
}

.dcc-rota-cell {
    min-width: 7rem;
    line-height: 1.25;
}

.dcc-rota-line {
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dcc-rota-hours {
    font-weight: 800;
    color: #0b3d78;
}

.dcc-staff-hours-th {
    white-space: nowrap;
    vertical-align: bottom;
}

.dcc-staff-hours-total {
    display: block;
    margin-top: 0.12rem;
    color: #0b3d78;
    font-size: 0.72rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    text-transform: none;
}

.dcc-staff-hours-cell {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #243b53;
}

.dcc-staff-role-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 7.5rem;
}

.dcc-staff-role-select {
    min-width: 6.5rem;
    font-weight: 600;
}

.dcc-staff-role-tick {
    color: #2e7d32;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.dcc-staff-role-tick.is-on {
    opacity: 1;
}

.dcc-rota-tick {
    color: #2e7d32;
    font-weight: 800;
    margin-left: 0.15rem;
}

.dcc-rota-cell.is-match .dcc-rota-hours,
.dcc-rota-cell.is-hours .dcc-rota-hours {
    color: #1b5e20;
}

.dcc-rota-cell.is-mismatch .dcc-rota-hours {
    color: #b71c1c;
}

.dcc-rota-cell.is-missing .dcc-rota-line,
.dcc-rota-cell.is-no_contract .dcc-rota-line {
    color: #78909c;
    font-weight: 600;
}

.dcc-contract-btn {
    border-radius: 999px;
    border: 1px solid rgba(251, 140, 0, 0.28);
    background: linear-gradient(180deg, #fff8e1 0%, #ffe0b2 100%);
    color: #9a4d00;
    font-weight: 700;
    padding: 0.28rem 0.75rem;
    box-shadow: 0 1px 0 #fff inset, 0 4px 10px rgba(251,140,0,0.12);
}

.dcc-contract-btn:hover {
    border-color: #ef6c00;
    color: #7a3c00;
    background: #ffecb3;
}

.dcc-contract-meta {
    margin-bottom: 0.85rem;
}

.dcc-contract-status-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.dcc-contract-confidence {
    font-size: 0.78rem;
    font-weight: 700;
    color: #3d6285;
}

.dcc-contract-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(21, 101, 192, 0.10);
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(226,239,251,0.9));
}

.dcc-contract-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #6a849e;
    margin-bottom: 0.15rem;
}

.dcc-contract-table th,
.dcc-contract-table td {
    white-space: nowrap;
}

.dcc-contract-summary-edit {
    align-items: end;
}

.dcc-contract-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.dcc-contract-rows {
    display: grid;
    gap: 0.7rem;
}

.dcc-contract-row {
    padding: 0.75rem 0.8rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(21, 101, 192, 0.12);
    background: linear-gradient(180deg, #fff, #f5f9fd);
}

.dcc-contract-row-top {
    display: grid;
    grid-template-columns: 7rem minmax(8rem, 1.4fr) 5.5rem 4.5rem 4.5rem auto;
    gap: 0.45rem;
    align-items: end;
}

.dcc-contract-days {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.45rem;
    margin-top: 0.55rem;
}

.dcc-contract-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    margin-right: 0.35rem;
    min-width: 6.5rem;
}

.dcc-contract-total-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #78909c;
    line-height: 1;
}

.dcc-contract-total-input {
    width: 6.5rem;
    text-align: right;
    font-weight: 800;
    color: #0b3d78;
    background: #f3f7fc !important;
    border-color: rgba(11, 61, 120, 0.18) !important;
    font-variant-numeric: tabular-nums;
    cursor: default;
}

.dcc-contract-row-remove {
    display: flex;
    align-items: end;
}

@media (max-width: 767.98px) {
    .dcc-contract-summary {
        grid-template-columns: 1fr;
    }

    .dcc-contract-row-top {
        grid-template-columns: 1fr 1fr;
    }
}

.dcc-confirm-tick {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.18);
    color: transparent;
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.dcc-confirm-tick.is-on {
    background: linear-gradient(180deg, #66bb6a, #2e7d32);
    border-color: rgba(46, 125, 50, 0.35);
    color: #fff;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.28);
}

.dcc-confirm-tick-lg {
    width: 1.85rem;
    height: 1.85rem;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.dcc-modal .modal-content {
    border-radius: 1.1rem;
}

/* Keep Save / Delete pinned while the form body scrolls */
.dcc-modal .modal-dialog-scrollable > .modal-content {
    max-height: calc(100vh - 3.5rem);
    overflow: hidden;
}

.dcc-modal .modal-dialog-scrollable > .modal-content > .modal-body {
    overflow-y: auto;
}

.dcc-modal .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: linear-gradient(180deg, #ffffff, #f4f9fd);
    border-top: 1px solid rgba(21, 101, 192, 0.12);
    gap: 0.45rem;
}

.dcc-modal .modal-footer .btn-primary {
    min-width: 8.5rem;
    font-weight: 700;
}

.dcc-careplan-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.85rem;
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(226,239,251,0.9));
    border: 1px solid rgba(21, 101, 192, 0.10);
}

.dcc-careplan-meta-actions {
    display: flex;
    gap: 0.4rem;
}

.dcc-careplan-frame {
    width: 100%;
    min-height: 28rem;
    border: 1px solid rgba(21, 101, 192, 0.12);
    border-radius: 0.85rem;
    background: #f8fbff;
}

.dcc-careplan-empty {
    padding: 1.25rem 1rem;
    border-radius: 0.85rem;
    background: rgba(21, 101, 192, 0.05);
    border: 1px dashed rgba(21, 101, 192, 0.22);
    margin-bottom: 0.85rem;
}

.dcc-careplan-actions {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0.85rem;
    margin-top: 1rem;
}

.dcc-careplan-upload,
.dcc-careplan-confirm-box {
    padding: 0.95rem;
    border-radius: 0.85rem;
    background: linear-gradient(165deg, rgba(255,255,255,0.96), rgba(236,245,253,0.92));
    border: 1px solid rgba(21, 101, 192, 0.10);
}

.dcc-upload-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 991.98px) {
    .dcc-careplan-actions {
        grid-template-columns: 1fr;
    }

    .dcc-list-search {
        justify-content: stretch;
    }

    .dcc-list-search .form-control {
        max-width: none;
        flex: 1;
    }
}
