@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope/manrope-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope/manrope-500.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope/manrope-600.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope/manrope-700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope/manrope-800.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* Reusable Executive Light design system */
* {
    font-family: 'Manrope', sans-serif;
}

html {
    scrollbar-gutter: stable both-edges;
}

body {
    background: radial-gradient(circle at 0% 0%, #eef4ff 0%, #f8fafc 55%);
    color: #0f172a;
}

.glass-light {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, .26);
}

.card-light {
    background: linear-gradient(180deg, #ffffff 0%, #fffdf9 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    text-decoration: none;
    color: inherit;
}

.card-gray {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px #fafffa;
    text-decoration: none;
    color: inherit;
}


.card-blue {
    background: #faffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    text-decoration: none;
    color: inherit;
}

.card-orange {
    background: #fffafa;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    text-decoration: none;
    color: inherit;
}


.kpi-pill {
    border-top: 2px solid #60a5fa;
}

.pill-title-header {
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 3px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    border-radius: .5rem;
    text-decoration: none;
    color: #334155;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: .2s ease;
}

.sidebar-link:hover {
    background: #f8fafc;
}

.sidebar-link.active {
    background: #eff6ff;
    color: #1d4ed8;
}

.sidebar-link i {
    color: #64748b;
}

.sidebar-link.active i {
    color: #1d4ed8;
}

.menu-toggle {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.menu-toggle>span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#toggleSidebar {
    border: 1px solid #cbd5e1;
    color: #334155;
}

#toggleSidebar:hover {
    background: #e2e8f0;
}


.badge-red {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-amber {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-teal {
    background: #ccfbf1;
    color: #115e59;
    border: 1px solid #99f6e4;
}

.money-up {
    color: #16a34a;
}

#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1200;
    flex: 0 0 auto;
    width: 18rem;
    min-width: 18rem;
    max-width: 18rem;
    overflow-y: auto;
    transition: transform .56s cubic-bezier(.22, .61, .36, 1), opacity .48s ease;
    transform: translateX(0);
}

#sidebar.sidebar-collapsed {
    opacity: 0;
    transform: translateX(-104%);
    pointer-events: none;
}

.exec-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .38);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .36s ease;
}

.exec-nav-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

body > .flex.min-h-screen > main {
    min-width: 0;
    width: 100%;
}

/* page padding vars */
:root {
    --page-pad-x: 1.5rem;
    --page-pad-y: 1.5rem;
}

@media (min-width: 768px) {
    :root {
        --page-pad-x: 2rem;
        --page-pad-y: 2rem;
    }
}

/* hero */
.exec-hero {
    height: 200px;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .26);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    background: #fff;

    /* clean “bleed” instead of magic numbers */
    margin-left: calc(-1 * var(--page-pad-x));
    margin-right: calc(-0 * var(--page-pad-x));
    margin-top: calc(-1 * var(--page-pad-y));
}

.exec-hero img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.menu-toggle {
    width: 100%;
}

.menu-toggle i:last-child {
    transition: transform .28s ease;
}

.menu-toggle.is-open i:last-child {
    transform: rotate(180deg);
}

.submenu {
    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    margin-left: .25rem;
    padding-left: .75rem;
    border-left: 1px solid #e2e8f0;
    transition: max-height .32s ease, opacity .24s ease, margin-top .24s ease;
}

.submenu.open {
    max-height: 520px;
    opacity: 1;
    margin-top: .25rem;
}

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

@media (min-width: 768px) {
    .dashboard-quick-actions .quick-actions-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .dashboard-quick-actions .quick-actions-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.dashboard-quick-actions .quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 90px;
    padding: .5rem .4rem;
    border-radius: .75rem;
    background: transparent;
    border: 1px solid transparent;
    color: #1f2937;
    text-decoration: none;
    text-align: center;
    transition: transform .24s ease, box-shadow .24s ease, background .24s ease, border-color .24s ease;
}

.dashboard-quick-actions .quick-action-btn i,
.dashboard-quick-actions .quick-action-btn svg {
    width: 40px;
    height: 40px;
    color: #686868;
    transition: transform .24s ease, color .24s ease;
}

.dashboard-quick-actions .quick-action-btn span {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.dashboard-quick-actions .quick-action-btn:hover {
    background: rgba(239, 246, 255, .75);
    border-color: #dbeafe;
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.dashboard-quick-actions .quick-action-btn:hover i,
.dashboard-quick-actions .quick-action-btn:hover svg {
    transform: scale(1.1);
    color: #1d4ed8;
}

.status-panels .status-card {
    background: #ffffff;
    border: 1px solid #dbeafe;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}

.status-panels .finance-status-card {
    background: #ffffff;
}

.status-panels .operations-status-card {
    background: #ffffff;
}

.status-panels .status-card-title {
    padding-bottom: .45rem;
    border-bottom: 1px dashed #cbd5e1;
}

.status-panels .status-line {
    align-items: center;
    padding: .55rem .7rem;
    border: 1px solid #dbeafe;
    border-radius: .6rem;
    background: #eff6ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}

.status-panels .finance-lines {
    margin-bottom: 0;
    border-bottom: 0;
}

.status-panels .status-line .finance-amt {
    font-weight: 600;
}

.status-panels .space-y-2 {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}


.header-welcome {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 42px;
}

.header-welcome-title {
    margin: 0;
    line-height: 1.2;
}

.header-welcome-sub {
    margin: 0;
    line-height: 1.25;
}

.executive-nav-scroll {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: .25rem;
}

.nav-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1024px) {
    #sidebar {
        width: min(20rem, 86vw);
        min-width: min(20rem, 86vw);
        max-width: min(20rem, 86vw);
    }
}

@media (max-width: 768px) {
    :root {
        --page-pad-x: 1rem;
        --page-pad-y: 1rem;
    }

    body {
        overflow-x: hidden;
    }

    #sidebar {
        width: min(19rem, 88vw);
        min-width: min(19rem, 88vw);
        max-width: min(19rem, 88vw);
        border-right-width: 1px;
    }

    .exec-hero {
        height: 138px;
        margin-left: calc(-1 * var(--page-pad-x));
        margin-right: calc(-1 * var(--page-pad-x));
        margin-top: calc(-1 * var(--page-pad-y));
    }

    main.flex-1 > header.glass-light {
        padding: 1rem;
    }

    main.flex-1 > header.glass-light.is-stuck {
        margin-left: calc(-1 * var(--page-pad-x));
        margin-right: calc(-1 * var(--page-pad-x));
    }

    .header-welcome-title {
        font-size: 1.05rem;
        line-height: 1.2;
    }

    .header-welcome-sub {
        font-size: .8rem;
    }

    .dashboard-quick-actions .quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
    }

    .dashboard-quick-actions .quick-action-btn {
        min-height: 82px;
        padding: .55rem .35rem;
    }

    .dashboard-quick-actions .quick-action-btn i,
    .dashboard-quick-actions .quick-action-btn svg {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 640px) {
    main.flex-1 > header.glass-light {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: .85rem;
    }

    main.flex-1 > header.glass-light > .flex.items-center.justify-between,
    main.flex-1 > header.glass-light > .flex.items-center.gap-3,
    main.flex-1 > header.glass-light > .flex.items-center.gap-6 {
        width: 100%;
    }

    main.flex-1 > header.glass-light .text-right {
        text-align: left;
    }

    .exec-hero {
        height: 118px;
    }

    .submenu {
        padding-left: .55rem;
    }

    body > .flex.min-h-screen > main {
        overflow-x: hidden;
    }
}

.msg-hide {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .35s ease, transform .35s ease;
}

@keyframes execEnter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.exec-enter {
    animation: execEnter .86s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .exec-enter {
        animation: none;
    }
}

/* Keep the top control/header bar visible while page content scrolls */
main.flex-1>header.glass-light {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: margin .22s ease, border-radius .22s ease, box-shadow .22s ease;
}

main.flex-1>header.glass-light.is-stuck {
    margin-left: calc(-1 * var(--page-pad-x));
    margin-right: calc(-1 * var(--page-pad-x));
    border-radius: 0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
}
