/* Project Control Center — light, spacious dashboard language. */
:root {
    --control-ink: #14315f;
    --control-muted: #60779e;
    --control-line: #d6e4f4;
    --control-page: #eef4fb;
    --control-card: #ffffff;
    --control-blue: #2563d8;
    --control-cyan: #0798ba;
    --control-green: #159b70;
    --control-orange: #d88920;
    --control-purple: #6654c9;
}

body,
body.auth-screen-active {
    background:
        radial-gradient(circle at 82% -10%, rgba(56, 189, 248, .14), transparent 34%),
        radial-gradient(circle at 8% 0%, rgba(37, 99, 235, .07), transparent 28%),
        var(--control-page);
    color: var(--control-ink);
}

body::before { display: none; }

.sidebar {
    width: 188px;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(180deg, #0b2d78 0%, #0b3b9b 58%, #071d50 100%);
    border-right: 1px solid rgba(143, 190, 255, .28);
    box-shadow: 9px 0 30px rgba(21, 55, 116, .18);
    color: #fff;
}

.sidebar::before,
.sidebar::after {
    content: '';
    position: absolute;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
}

.sidebar::before {
    right: -92px;
    bottom: 88px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle at 35% 35%, rgba(80, 143, 255, .56), rgba(45, 93, 218, .08) 55%, transparent 70%);
    transform: rotate(-18deg);
}

.sidebar::after {
    left: -118px;
    bottom: -86px;
    width: 300px;
    height: 170px;
    border: 22px solid rgba(69, 126, 246, .28);
    transform: rotate(-23deg);
}

.sidebar > * {
    position: relative;
    z-index: 1;
}

.sidebar-header {
    min-height: 104px;
    padding: 1.15rem 1rem;
    gap: .72rem;
    border-bottom: 1px solid rgba(166, 201, 255, .2);
    background: transparent;
}

.sidebar-logo {
    width: 36px;
    height: 42px;
    flex: 0 0 36px;
    color: #fff;
    background: linear-gradient(145deg, #5b83f5, #3156d5);
    border-radius: 0;
    clip-path: polygon(50% 0, 94% 24%, 94% 76%, 50% 100%, 6% 76%, 6% 24%);
    box-shadow: 0 8px 18px rgba(50, 91, 211, .2);
    font-size: .94rem;
}

.sidebar-title { color: #fff; font-size: 1.02rem; }
.sidebar-subtitle { color: #b7d0ff; font-size: .64rem; letter-spacing: .06em; }
.sidebar-collapse-btn { color: #dbeafe; background: rgba(255,255,255,.1); border-color: rgba(190, 218, 255, .32); }
.sidebar-collapse-btn:hover,
.sidebar-collapse-btn:focus-visible { color: #fff; background: rgba(72, 139, 255, .48); border-color: rgba(226, 239, 255, .72); }

.sidebar-nav { padding: 1.35rem .5rem; }
.nav-item {
    margin: .22rem 0;
    padding: .73rem .72rem;
    color: #d1e0fb;
    border-left: 0;
    border-radius: 10px;
    gap: .7rem;
    font-size: .78rem;
}
.nav-item:hover { color: #fff; background: rgba(86, 151, 255, .18); }
.nav-item.active {
    color: #fff;
    background: linear-gradient(90deg, #4d88ff, #276be9);
    border-left-color: transparent;
    box-shadow: 0 8px 18px rgba(20, 76, 183, .34), inset 0 0 0 1px rgba(255,255,255,.12);
}
.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(196, 222, 255, .38);
    border-radius: 6px;
    background: rgba(255,255,255,.08);
    box-shadow: inset 0 0 0 3px rgba(7, 35, 96, .22);
}
.nav-item.active .nav-icon { border-color: rgba(255,255,255,.58); background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 3px rgba(26, 86, 210, .28); }
.sidebar-profile {
    margin: auto .2rem .4rem;
    padding: .7rem .55rem;
    border: 1px solid rgba(166, 201, 255, .25);
    border-radius: 12px;
    background: rgba(5, 26, 79, .42);
}
.profile-avatar { width: 34px; height: 34px; color: #dbeafe; background: rgba(95, 156, 255, .24); border-color: rgba(179, 215, 255, .5); }
.sidebar-profile strong { color: #fff; font-size: .72rem; }
.sidebar-profile span { color: #b7cbed; font-size: .6rem; }

.main-content { margin-left: 188px; }
.topbar {
    height: 78px;
    padding: 0 2rem;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--control-line);
    box-shadow: 0 5px 18px rgba(73, 105, 157, .09);
}
.topbar-leading { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.topbar-heading { display: flex; flex-direction: column; gap: .1rem; }
.topbar-heading .page-title { color: var(--control-ink); font-size: 1.2rem; letter-spacing: -.03em; }
.topbar-subtitle { color: #8292ae; font-size: .68rem; }
.topbar-actions { gap: .6rem; max-width: 72%; }
.topbar-actions .btn-secondary { min-height: 36px; color: #4f6289; background: #fff; border-color: #dce6f4; font-size: .7rem; }
.google-login-button { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; white-space: nowrap; }
.google-brand-icon { display: inline-grid; width: 16px; height: 16px; flex: 0 0 16px; place-items: center; }
.google-brand-icon svg { display: block; width: 100%; height: 100%; }
.google-login-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar-date { display: inline-flex; align-items: center; gap: .45rem; color: #617499; font-size: .7rem; white-space: nowrap; }
.topbar-date::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #20bb7a; box-shadow: 0 0 0 4px #e5f8ef; }
.search-bar { border: 1px solid #dce6f4; border-radius: 9px; background: #fff; }
.search-bar input { min-height: 36px; font-size: .72rem; }
.notification-button { width: 38px; height: 38px; color: #5d719a; background: #fff; border: 1px solid #dce6f4; border-radius: 9px; }
.notification-button i { width: 7px; height: 7px; right: 7px; top: 6px; background: #4d6de5; box-shadow: none; }
.content-area {
    padding: 1.7rem 2rem 2.4rem;
    background: linear-gradient(180deg, rgba(238, 244, 251, .94), rgba(247, 250, 255, .98));
}

.control-center-page {
    width: 100%;
    max-width: 1480px;
    min-width: 0;
    margin-inline: auto;
    overflow: clip;
}
.control-card-kicker { color: #5b77d9; font-size: .62rem; font-weight: 800; letter-spacing: .15em; }
.panel-restore-bar { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; margin-bottom: .7rem; color: #8494ae; font-size: .62rem; }
.panel-restore-bar button { padding: .28rem .5rem; color: #426cdf; background: #fff; border: 1px solid #d9e5f5; border-radius: 7px; font-size: .61rem; cursor: pointer; }
.panel-restore-bar button:hover, .panel-restore-bar button:focus-visible { color: #214cb5; background: #f2f6ff; border-color: #b8cdf2; }
.panel-restore-bar .restore-all-button { color: #697d9f; background: #f7faff; }

.control-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1.1rem; }
.control-kpi { position: relative; min-height: 132px; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: 1rem 1.15rem; background: var(--control-card); border: 1px solid var(--control-line); border-radius: 16px; box-shadow: 0 9px 24px rgba(68, 103, 157, .065); transform: translateZ(0); transition: transform 240ms cubic-bezier(.2, 0, 0, 1), box-shadow 240ms cubic-bezier(.2, 0, 0, 1), border-color 240ms ease; animation: control-surface-enter 420ms cubic-bezier(.2, 0, 0, 1) both; }
.control-kpi:nth-child(2) { animation-delay: 45ms; }
.control-kpi:nth-child(3) { animation-delay: 90ms; }
.control-kpi:nth-child(4) { animation-delay: 135ms; }
.control-kpi:nth-child(5) { animation-delay: 180ms; }
.control-kpi:hover, .control-kpi:focus-within { transform: translateY(-4px); border-color: #cbdaf4; box-shadow: 0 16px 30px rgba(68, 103, 157, .13); }
.control-kpi::after { content: ''; position: absolute; inset: auto -10% -42% 34%; height: 100px; border-radius: 50%; background: var(--kpi-tint); opacity: .38; }
.control-kpi-copy { position: relative; z-index: 1; min-width: 0; }
.control-kpi-label { display: block; color: #7183a4; font-size: .66rem; font-weight: 700; }
.control-kpi-copy > strong { display: block; margin: .18rem 0 .06rem; color: var(--control-ink); font-size: 1.9rem; line-height: 1; letter-spacing: -.04em; }
.control-kpi-copy small { color: #90a0ba; font-size: .62rem; white-space: nowrap; }
.control-kpi-copy small b { color: var(--control-green); font-weight: 800; }
.control-kpi-icon { position: absolute; right: .8rem; top: .8rem; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; color: var(--kpi-color); background: var(--kpi-tint); border-radius: 9px; }
.control-kpi-icon .premium-icon { width: 15px; height: 15px; }
.kpi-mascot { position: absolute; z-index: 0; right: -.35rem; bottom: -.95rem; width: 84px; height: 84px; object-fit: contain; opacity: .92; transform-origin: 70% 88%; filter: drop-shadow(0 8px 10px rgba(49, 93, 184, .13)); transition: filter 220ms ease, opacity 220ms ease; }
.control-kpi:hover .kpi-mascot, .control-kpi:focus-within .kpi-mascot { animation: kpi-mascot-bob 900ms cubic-bezier(.175, .885, .32, 1.275) infinite; opacity: 1; filter: drop-shadow(0 12px 13px rgba(49, 93, 184, .2)); }
.kpi-mascot-small { width: 70px; height: 70px; bottom: -.55rem; right: -.25rem; }
.control-kpi-blue { --kpi-color: #3474e9; --kpi-tint: #e6efff; --mascot-tilt: -3deg; }
.control-kpi-green { --kpi-color: #14a66b; --kpi-tint: #e4f8ef; --mascot-tilt: 3deg; }
.control-kpi-cyan { --kpi-color: #149db8; --kpi-tint: #e1f7fb; --mascot-tilt: -2deg; }
.control-kpi-orange { --kpi-color: #d9841d; --kpi-tint: #fff2dc; --mascot-tilt: 2deg; }
.control-kpi-purple { --kpi-color: #7254dc; --kpi-tint: #eeeaff; --mascot-tilt: -3deg; }

@keyframes control-surface-enter {
    from { opacity: 0; translate: 0 12px; }
    to { opacity: 1; translate: 0 0; }
}

@keyframes kpi-mascot-bob {
    0%, 100% { transform: translate3d(0, -4px, 0) rotate(calc(var(--mascot-tilt, 0deg) - 1deg)) scale(1.03); }
    50% { transform: translate3d(0, -11px, 0) rotate(calc(var(--mascot-tilt, 0deg) + 2deg)) scale(1.09); }
}

.control-overview-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(260px, .72fr); gap: 1.1rem; align-items: start; }
.control-overview-grid > *, .control-bottom-grid > *, .department-showcase-card { animation: control-surface-enter 520ms cubic-bezier(.2, 0, 0, 1) both; }
.control-overview-grid > :nth-child(2), .control-bottom-grid > :nth-child(2) { animation-delay: 70ms; }
.control-overview-grid.upcoming-hidden { grid-template-columns: 1fr; }
.control-timeline-col { min-width: 0; }
.control-card, .project-timeline-card { background: var(--control-card); border: 1px solid var(--control-line); border-radius: 16px; box-shadow: 0 9px 24px rgba(68, 103, 157, .055); transition: transform 220ms cubic-bezier(.2, 0, 0, 1), box-shadow 220ms cubic-bezier(.2, 0, 0, 1), border-color 220ms ease; }
.control-card:hover, .project-timeline-card:hover { transform: translateY(-2px); border-color: #d0def2; box-shadow: 0 14px 28px rgba(68, 103, 157, .1); }
.control-timeline-col > .project-timeline-card { height: auto; min-height: 360px; margin: 0; overflow: hidden; }
.project-timeline-card { border-radius: 16px; }
.project-timeline-card .premium-section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.2rem .9rem; border-bottom: 1px solid #e6edf7; }
.project-timeline-card .premium-section-header h3 { color: var(--control-ink); font-size: 1.02rem; }
.project-timeline-card .premium-section-header span { color: var(--control-muted); font-size: .68rem; }
.timeline-controls { flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.timeline-controls > strong { color: #4f6692; font-size: .7rem; min-width: 88px; text-align: center; }
.timeline-view-toggle { display: inline-flex; padding: .15rem; background: #f2f6fc; border: 1px solid #e0e8f4; border-radius: 7px; }
.timeline-view-btn { padding: .28rem .5rem; color: #7788a6; background: transparent; border: 0; border-radius: 5px; cursor: pointer; font-size: .64rem; }
.timeline-view-btn.is-active { color: #315ed4; background: #fff; box-shadow: 0 2px 6px rgba(48, 86, 160, .12); }
.timeline-add-plan { min-height: 28px; padding: .3rem .55rem; font-size: .64rem; }
.timeline-nav-btn { width: 28px; min-height: 28px; padding: 0; border-radius: 7px; }
.timeline-gantt-scroll { padding: 0 1.2rem 1.2rem; }
.timeline-gantt { min-width: 720px; }
.timeline-gantt-head, .timeline-year-gantt-head { color: #7586a5; border-bottom: 1px solid #e8eef7; }
.timeline-gantt-head > span:first-child, .timeline-year-gantt-head > span:first-child { color: #50668f; font-size: .67rem; font-weight: 800; }
.timeline-day, .timeline-year-month { color: #8394b0; border-color: #edf2f8; background: #fbfdff; font-size: .63rem; }
.timeline-day.weekend, .timeline-year-month:nth-child(odd) { background: #f7faff; }
.timeline-gantt-row, .timeline-year-gantt-row { border-bottom-color: #eef3f9; }
.timeline-gantt-label { padding: .6rem .65rem .6rem 0; }
.timeline-gantt-label strong { color: #25385f; font-size: .66rem; }
.timeline-gantt-label small { color: #94a3bc; font-size: .57rem; }
.timeline-gantt-bar { border-radius: 7px; box-shadow: none; font-size: .59rem; }
.timeline-project-group { display: grid; gap: .2rem; }
.timeline-gantt-project-row, .timeline-gantt-phase-row, .timeline-year-gantt-project-row, .timeline-year-gantt-phase-row { position: relative; display: grid; align-items: center; }
.timeline-gantt-project-row, .timeline-gantt-phase-row { grid-template-columns: 220px repeat(var(--timeline-days), minmax(38px, 1fr)); background-image: repeating-linear-gradient(90deg, transparent 0, transparent 37px, #edf1f6 37px, #edf1f6 38px); background-position: 220px 0; }
.timeline-year-gantt-project-row, .timeline-year-gantt-phase-row { grid-template-columns: 220px repeat(var(--timeline-months), minmax(92px, 1fr)); background-image: repeating-linear-gradient(90deg, transparent 0, transparent 103px, #edf1f6 103px, #edf1f6 104px); background-position: 220px 0; }
.timeline-gantt-project-row, .timeline-year-gantt-project-row { min-height: 58px; border: 1px solid #e1e9f5; border-radius: 10px; background-color: #fbfdff; }
.timeline-gantt-phase-row, .timeline-year-gantt-phase-row { min-height: 44px; margin-left: .45rem; border-bottom: 1px solid #eef3f9; border-radius: 8px; background-color: #fff; }
.timeline-gantt-project-row .timeline-gantt-label, .timeline-year-gantt-project-row .timeline-gantt-label { background: #fbfdff; }
.timeline-gantt-phase-row .timeline-gantt-label, .timeline-year-gantt-phase-row .timeline-gantt-label { background: #fff; }
.timeline-project-label { position: sticky; left: 0; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; gap: .18rem .3rem; min-width: 0; padding: .45rem .65rem; border-right: 1px solid #e5eaf1; }
.timeline-project-toggle { display: flex; align-items: center; min-width: 0; grid-column: 1 / -1; gap: .3rem; padding: 0; border: 0; color: #25385f; background: transparent; text-align: left; cursor: pointer; font: inherit; }
.timeline-project-toggle:hover .timeline-project-copy strong, .timeline-project-toggle:focus-visible .timeline-project-copy strong { color: #2c61d1; }
.timeline-project-toggle:focus-visible { outline: 2px solid #8db3ff; outline-offset: 2px; border-radius: 5px; }
.timeline-project-chevron { display: inline-grid; place-items: center; flex: 0 0 16px; width: 16px; height: 16px; color: #4675e4; font-size: .95rem; font-weight: 800; line-height: 1; }
.timeline-project-copy { display: flex; min-width: 0; flex-direction: column; gap: .12rem; }
.timeline-project-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #25385f; font-size: .66rem; }
.timeline-project-copy small { color: #91a1bc; font-size: .55rem; }
.timeline-project-status { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: .14rem .38rem; border-radius: 999px; font-size: .5rem; font-weight: 800; line-height: 1.2; }
.timeline-project-status.is-complete { color: #12835f; background: #e2f7ed; }
.timeline-project-status.is-progress { color: #2365cc; background: #e5efff; }
.timeline-project-status.is-planned { color: #b36b11; background: #fff1d7; }
.timeline-project-open { align-self: center; justify-self: end; color: #8ba0c2; text-decoration: none; font-size: .76rem; line-height: 1; }
.timeline-project-open:hover, .timeline-project-open:focus-visible { color: #2c61d1; outline: none; }
.timeline-phase-label { position: sticky; left: 0; z-index: 2; justify-content: center; gap: .08rem; padding: .35rem .65rem .35rem 1.8rem; border-right: 1px solid #edf1f6; }
.timeline-phase-index { color: #8aa0c2; font-size: .48rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.timeline-phase-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #435b83; font-size: .61rem; }
.timeline-phase-label small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #99a8be; font-size: .51rem; }
.timeline-project-summary { opacity: .72; }
.timeline-project-group.is-expanded .timeline-project-summary { opacity: .38; }
.timeline-phase-bar { min-height: 25px; opacity: .92; }
.timeline-phase-outside { opacity: .78; }
.timeline-phase-outside-note { align-self: center; margin-left: .65rem; color: #a0aec0; font-size: .56rem; font-style: italic; }
.timeline-color-0 { color: #1d63d9; background: #dceaff; border-color: #b8d2ff; }
.timeline-color-1 { color: #118c72; background: #d9f5eb; border-color: #a7e6cd; }
.timeline-color-2 { color: #c37a17; background: #fff0d2; border-color: #f5d18f; }
.timeline-color-3 { color: #7951ce; background: #eee8ff; border-color: #d7c7ff; }
.timeline-gantt-bar:hover { filter: saturate(1.08); transform: translateY(-1px); }
.timeline-empty { color: #91a1bc; background: #f8fbff; border: 1px dashed #dce6f4; border-radius: 10px; padding: 1rem; font-size: .72rem; }

.upcoming-card { min-width: 0; display: flex; flex-direction: column; padding: 1.15rem 1.05rem 1rem; }
.control-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.control-card-heading h2 { margin: .18rem 0 0; color: var(--control-ink); font-size: 1rem; letter-spacing: -.03em; }
.control-card-heading p { margin: .35rem 0 0; color: var(--control-muted); font-size: .68rem; }
.panel-heading-tools { display: flex; align-items: center; gap: .32rem; }
.panel-actions { display: inline-flex; align-items: center; gap: .22rem; }
.panel-action-button { width: 30px; height: 30px; display: inline-grid; place-items: center; padding: 0; color: #5d76ab; background: #f4f7fd; border: 1px solid #dbe6f5; border-radius: 8px; cursor: pointer; font-size: .95rem; line-height: 1; }
.panel-action-button:hover, .panel-action-button:focus-visible { color: #2d5dce; background: #eaf1ff; border-color: #b9cdf3; }
.panel-hide-button { color: #8b9bb7; }
.panel-hide-button:hover, .panel-hide-button:focus-visible { color: #c15e71; background: #fff0f2; border-color: #f0c5cf; }
.control-card.is-hidden { display: none; }
.control-card.is-collapsed .panel-content { display: none; }
.control-card.is-collapsed .control-card-heading { margin-bottom: 0; }
.heading-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; color: #4675e4; background: #eaf1ff; border-radius: 9px; }
.heading-icon .premium-icon { width: 16px; height: 16px; }
.upcoming-list { display: grid; gap: .3rem; }
.upcoming-item { display: grid; grid-template-columns: 48px minmax(0,1fr) 16px; align-items: center; gap: .58rem; padding: .55rem .2rem; border-bottom: 1px solid #edf2f8; transition: transform 180ms cubic-bezier(.2, 0, 0, 1), background-color 180ms ease; }
.upcoming-item:hover, .upcoming-item:focus-visible { transform: translateX(4px); background: #f8fbff; }
.upcoming-item:last-child { border-bottom: 0; }
.upcoming-date { display: grid; place-items: center; min-height: 40px; border-radius: 9px; }
.upcoming-date b { font-size: .63rem; line-height: 1.1; }
.upcoming-date small { font-size: .5rem; opacity: .8; }
.upcoming-blue { color: #2863d9; background: #e6efff; }
.upcoming-green { color: #168e62; background: #e3f8ef; }
.upcoming-orange { color: #bc741c; background: #fff1db; }
.upcoming-purple { color: #7650d0; background: #eee8ff; }
.upcoming-copy { min-width: 0; }
.upcoming-copy strong, .upcoming-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-copy strong { color: #2a3d64; font-size: .66rem; }
.upcoming-copy small { margin-top: .14rem; color: #94a3ba; font-size: .56rem; }
.upcoming-arrow { color: #9bacc3; font-size: .9rem; }
.upcoming-empty { display: grid; place-items: center; gap: .35rem; padding: 2.2rem .5rem; text-align: center; }
.upcoming-empty > span { color: #6b86df; }
.upcoming-empty p { margin: 0; color: #6f80a0; font-size: .72rem; }
.upcoming-empty small { color: #a0aec2; font-size: .6rem; }
.text-link, .outline-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: auto; color: #426cdf; font-size: .66rem; font-weight: 700; }
.text-link:hover, .outline-link:hover { color: #214cb5; }

.control-bottom-grid { display: grid; grid-template-columns: minmax(0, 1.34fr) minmax(390px, 1fr); gap: 1.1rem; margin-top: 1.1rem; align-items: stretch; }
.control-bottom-grid > .is-collapsed { align-self: start; }
.control-bottom-grid.health-hidden .department-summary-card { grid-column: 1 / -1; }
.control-bottom-grid.department-hidden .status-overview-card { grid-column: 1 / -1; }
.control-bottom-grid.health-hidden.department-hidden { display: none; }
.status-overview-card, .department-showcase-card { padding: 1.15rem 1.2rem 1.1rem; }
.status-overview-card, .department-summary-card { background-color: #fff; background-image: linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .84)), url('../assets/dashboard-mascot-background.png'); background-repeat: no-repeat; background-size: 100% 100%, auto 100%; }
.status-overview-card { background-position: center, left center; }
.department-summary-card { background-position: center, right center; }
.status-overview-card.is-collapsed, .department-summary-card.is-collapsed { background-color: #fff; background-image: none; }
.health-panel-content { display: grid; gap: .85rem; }
.health-detail-divider { height: 1px; background: #e7effa; }
.health-detail-heading { display: flex; align-items: center; gap: .6rem; }
.health-detail-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; color: #3478ed; background: #eaf3ff; border-radius: 50%; }
.health-detail-icon .premium-icon { width: 19px; height: 19px; }
.health-detail-heading h3 { margin: 0; color: #243c68; font-size: .86rem; line-height: 1.25; }
.health-detail-heading p { margin: .12rem 0 0; color: #879bbc; font-size: .63rem; }
.health-status-list { display: grid; gap: .32rem; }
.health-status-row { display: grid; grid-template-columns: 31px minmax(80px, 1fr) 30px minmax(44px, auto); align-items: center; gap: .55rem; min-width: 0; padding: .42rem .55rem; color: #314a76; text-align: left; background: #f9fcff; border: 1px solid #e3edfa; border-radius: 11px; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease; }
.health-status-row:hover, .health-status-row:focus-visible { background: #fff; border-color: color-mix(in srgb, var(--status-tone) 34%, white); outline: none; transform: translateY(-1px); }
.health-status-row.is-selected, .status-summary.is-selected { border-color: var(--status-tone); background: color-mix(in srgb, var(--status-bg) 42%, white); box-shadow: 0 0 0 2px color-mix(in srgb, var(--status-tone) 15%, transparent); }
.health-status-row:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--status-tone) 18%, transparent); }
.health-status-row-icon { display: grid; place-items: center; width: 31px; height: 31px; color: var(--status-tone); background: var(--status-bg); border-radius: 50%; }
.health-status-row-icon .premium-icon { width: 17px; height: 17px; }
.health-status-row-label { overflow: hidden; color: #314a76; font-size: .72rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.health-status-row-count { color: #263e6a; font-size: .9rem; text-align: right; }
.health-status-row-percent { justify-self: end; min-width: 44px; padding: .23rem .4rem; color: var(--status-tone); background: var(--status-bg); border-radius: 99px; font-size: .63rem; font-weight: 800; text-align: center; white-space: nowrap; }
.health-status-row-percent.is-not-applicable { color: #8999b2; background: #eef3f8; }
.department-summary-card { min-width: 0; padding: 1.15rem 1.2rem 1.1rem; }
.department-breakdown-header { align-items: flex-start; margin-bottom: .8rem; }
.department-breakdown-heading { min-width: 0; }
.department-breakdown-heading h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.department-breakdown-heading p { margin: .16rem 0 0; color: #879bbc; font-size: .63rem; }
.department-summary-card .panel-heading-tools { flex: 0 0 auto; }
.department-breakdown-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .42rem; }
.department-breakdown-empty { grid-column: 1 / -1; padding: 1.2rem .6rem; color: #879bbc; font-size: .72rem; text-align: center; background: rgba(255, 255, 255, .65); border: 1px dashed #d8e4f4; border-radius: 12px; }
.department-breakdown-tile { --department-tone: #e94362; --department-tint: #fff1f4; --department-edge: #ffd3dc; display: flex; flex-direction: column; justify-content: space-between; gap: .5rem; min-width: 0; min-height: 108px; padding: .58rem .58rem .5rem; color: #243b66; text-align: left; background: linear-gradient(145deg, color-mix(in srgb, var(--department-tint) 78%, white), #fff 92%); border: 1px solid var(--department-edge); border-radius: 14px; box-shadow: 0 3px 9px color-mix(in srgb, var(--department-tone) 8%, transparent); cursor: pointer; transition: transform 180ms cubic-bezier(.2, 0, 0, 1), box-shadow 180ms ease, border-color 180ms ease; }
.department-breakdown-tile:hover, .department-breakdown-tile:focus-visible { border-color: color-mix(in srgb, var(--department-tone) 56%, white); box-shadow: 0 7px 14px color-mix(in srgb, var(--department-tone) 16%, transparent); outline: none; transform: translateY(-2px); }
.department-breakdown-tile:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--department-tone) 26%, transparent), 0 7px 14px color-mix(in srgb, var(--department-tone) 16%, transparent); }
.department-breakdown-tile.is-selected { border-color: var(--department-tone); box-shadow: 0 0 0 2px color-mix(in srgb, var(--department-tone) 16%, transparent), 0 4px 10px color-mix(in srgb, var(--department-tone) 11%, transparent); }
.department-tile-head { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: .38rem; min-width: 0; }
.department-tile-icon { position: relative; display: block; width: 48px; height: 48px; overflow: visible; background: none; border: 0; border-radius: 0; box-shadow: none; transform-origin: center; transition: transform 180ms cubic-bezier(.2, 0, 0, 1); }
.department-tile-icon::before { content: ''; position: absolute; top: 50%; left: 0; width: 48px; height: 32px; background-image: url('../assets/team-department-icons-v1.png'); background-repeat: no-repeat; background-size: 300% auto; background-position: var(--sprite-x) var(--sprite-y); transform: translateY(-50%); }
.department-breakdown-tile:hover .department-tile-icon, .department-breakdown-tile:focus-visible .department-tile-icon { transform: translateY(-1px) scale(1.07); }
.department-tile-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; gap: .1rem; }
.department-tile-copy strong { display: -webkit-box; max-width: 100%; overflow: hidden; color: #263d66; font-size: .79rem; font-weight: 700; line-height: 1.28; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.department-tile-copy b { color: var(--department-tone); font-size: 1.45rem; font-weight: 800; line-height: 1; }
.department-tile-share { align-self: flex-end; display: flex; align-items: baseline; gap: .22rem; margin-top: auto; color: var(--department-tone); }
.department-tile-share strong { font-size: .78rem; font-weight: 800; }
.department-tile-share small { color: #8292aa; font-size: .55rem; }
.department-icon-building { --sprite-x: 0%; --sprite-y: 0%; --department-tone: #ec4966; --department-tint: #fff0f3; --department-edge: #ffc5d0; }
.department-icon-truck { --sprite-x: 50%; --sprite-y: 0%; --department-tone: #1585e8; --department-tint: #edf8ff; --department-edge: #b8e0ff; }
.department-icon-air { --sprite-x: 100%; --sprite-y: 0%; --department-tone: #7b42df; --department-tint: #f4efff; --department-edge: #ddccff; }
.department-icon-people { --sprite-x: 0%; --sprite-y: 50%; --department-tone: #0aa978; --department-tint: #edfff7; --department-edge: #b5f0d9; }
.department-icon-cart { --sprite-x: 50%; --sprite-y: 50%; --department-tone: #f18422; --department-tint: #fff5e9; --department-edge: #ffdbb3; }
.department-icon-laptop { --sprite-x: 100%; --sprite-y: 50%; --department-tone: #1779e5; --department-tint: #edf6ff; --department-edge: #c0dcff; }
.department-icon-coffee { --sprite-x: 0%; --sprite-y: 100%; --department-tone: #e84763; --department-tint: #fff0f3; --department-edge: #ffc5d0; }
.department-icon-checklist { --sprite-x: 50%; --sprite-y: 100%; --department-tone: #2380e9; --department-tint: #edf7ff; --department-edge: #bcdfff; }
.department-icon-trend { --sprite-x: 100%; --sprite-y: 100%; --department-tone: #7a40dc; --department-tint: #f4efff; --department-edge: #ddccff; }
.success-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .5rem; color: #138c61; background: #e7f8f0; border-radius: 999px; font-size: .6rem; font-weight: 800; white-space: nowrap; }
.success-pill span { width: 6px; height: 6px; border-radius: 50%; background: #20b879; }
.status-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .62rem; }
.status-summary { position: relative; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; column-gap: .52rem; min-width: 0; padding: .7rem; text-align: left; background: #fbfdff; border: 1px solid #e4ecf7; border-radius: 11px; cursor: pointer; }
.status-summary:hover { border-color: #cbdaf4; background: #f7faff; }
.status-summary-icon { display: grid; place-items: center; width: 27px; height: 27px; color: var(--status-tone); background: var(--status-bg); border-radius: 8px; }
.status-summary-icon .premium-icon { width: 14px; height: 14px; }
.status-summary-copy { min-width: 0; }
.status-summary-copy strong, .status-summary-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-summary-copy strong { color: #32466d; font-size: .67rem; }
.status-summary-copy small { color: #9aa8bd; font-size: .55rem; }
.status-summary-count { color: #273c63; font-size: 1.05rem; }
.status-summary em { grid-column: 3; color: var(--status-tone); font-size: .57rem; font-style: normal; font-weight: 800; }
.status-summary-green { --status-tone: #18a96e; --status-bg: #e2f8ee; }
.status-summary-blue { --status-tone: #3775e4; --status-bg: #e5efff; }
.status-summary-orange { --status-tone: #d48926; --status-bg: #fff0d8; }
.status-legend { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .95rem; }
.status-legend .legend-item { display: inline-flex; align-items: center; gap: .3rem; color: #7385a3; background: none; border: 0; padding: 0; font-size: .61rem; cursor: pointer; }
.status-legend .legend-item b { color: #3c5077; }
.legend-color { width: 7px; height: 7px; border-radius: 50%; }
.legend-green { background: #1cad75; }.legend-blue { background: #397be9; }.legend-orange { background: #eda13a; }
.department-showcase-card { margin-top: 1.1rem; }
.department-showcase-card .control-card-heading { align-items: flex-end; }
.department-showcase-card .department-showcase { display: grid; gap: .9rem; }
.department-showcase-card .department-showcase > div { margin-bottom: 0 !important; padding: .9rem; background: #fbfdff; border: 1px solid #e5edf7; border-radius: 12px; }
.department-showcase-card .department-showcase h4 { margin: 0 0 .65rem !important; padding: 0 0 .6rem !important; color: #3f557d !important; border-bottom-color: #e6eef8 !important; font-size: .77rem !important; }
.department-showcase-card .department-showcase h4 .department-heading-icon { color: #5177dc; }
.department-showcase-card .horizontal-scroll {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(240px, 340px));
    justify-content: start;
    gap: .8rem !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
}
.department-showcase-card .horizontal-scroll > .card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    border-color: #e0e9f5 !important;
    background: #fff !important;
    box-shadow: 0 5px 14px rgba(58, 96, 151, .06) !important;
}
.department-showcase-card .horizontal-scroll > .card:hover { transform: translateY(-3px) !important; box-shadow: 0 10px 20px rgba(58, 96, 151, .11) !important; }

.control-center-page .btn-primary { color: #fff; background: linear-gradient(135deg, #4c72e9, #3560d1); border-color: #4c72e9; box-shadow: 0 6px 14px rgba(55, 96, 210, .18); }
.control-center-page .btn-primary:hover { background: linear-gradient(135deg, #3b63df, #294fc4); }

body.sidebar-collapsed .sidebar { width: 78px; }
body.sidebar-collapsed .main-content { margin-left: 78px; }

@media (max-width: 1240px) {
    .control-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .control-overview-grid { grid-template-columns: 1fr; }
    .upcoming-card { min-height: 220px; }
}
@media (max-width: 980px) {
    .topbar-date { display: none; }
}
@media (max-width: 1100px) {
    .control-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
    .timeline-gantt-project-row, .timeline-gantt-phase-row { grid-template-columns: 174px repeat(var(--timeline-days), minmax(34px, 1fr)); background-position: 174px 0; }
    .timeline-year-gantt-project-row, .timeline-year-gantt-phase-row { grid-template-columns: 174px repeat(var(--timeline-months), minmax(70px, 1fr)); background-position: 174px 0; }
    .department-showcase-card .department-showcase .horizontal-scroll { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .sidebar { width: 188px; }
    .main-content { margin-left: 0; }
    .content-area { padding: 1.15rem; }
    .topbar { padding: .75rem 1rem; }
    .topbar-heading .page-title { font-size: 1rem; }
    .topbar-subtitle { display: none; }
    .panel-restore-bar { justify-content: flex-start; }
    .control-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .status-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .38rem; }
    .status-summary { grid-template-columns: 28px minmax(0,1fr) auto; }
    .topbar-actions { max-width: none; }
    .topbar-actions .search-bar { max-width: 180px; }
    .panel-action-button { width: 40px; height: 40px; }
    .department-summary-card { padding: 1rem; }
    .department-breakdown-header { min-height: 0; }
}
@media (max-width: 480px) {
    .control-kpi-grid { grid-template-columns: 1fr; }
    .control-kpi { min-height: 110px; }
    .topbar-actions .search-bar { display: none; }
    .project-timeline-card .premium-section-header { flex-direction: column; }
    .timeline-controls { justify-content: flex-start; width: 100%; }
    .control-timeline-col > .project-timeline-card { min-height: 0; }
    .department-breakdown-heading h2 { font-size: .92rem; }
    .department-showcase-card .department-showcase .horizontal-scroll { grid-template-columns: 1fr; }
    .department-summary-card .panel-heading-tools { gap: .22rem; }
    .department-summary-card .heading-icon, .department-summary-card .panel-action-button { width: 36px; height: 36px; }
    .department-breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .department-breakdown-tile { min-height: 80px; padding: .38rem; }
    .department-tile-head { grid-template-columns: 36px minmax(0, 1fr); gap: .32rem; }
    .department-tile-icon { width: 36px; height: 36px; }
    .department-tile-icon::before { width: 36px; height: 24px; }
    .department-tile-copy strong { font-size: .7rem; }
    .department-tile-copy b { font-size: 1.2rem; }
    .status-summary-grid { grid-template-columns: 1fr; }
    .health-status-row { grid-template-columns: 31px minmax(68px, 1fr) 26px minmax(52px, auto); gap: .38rem; padding: .38rem; }
    .health-status-row-label { font-size: .66rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
