:root {
    --brand-blue: #0f4f82;
    --brand-green: #1aa85b;
    --brand-orange: #f2a22a;
    --bg-start: #f8f9fb;
    --bg-end: #dce9f3;
    --surface-bg: #ffffff;
    --surface-text: #1c2633;
    --surface-muted: #5f6f82;
    --surface-border: #d8e1eb;
    --input-bg: #ffffff;
    --input-text: #1c2633;
    --ink: var(--brand-blue);
    --accent: var(--brand-orange);
    --mint: var(--brand-green);
    --rose: #e63946;
    --paper: #f8f9fb;
    --bs-body-font-family: "Bookman Old Style", "Book Antiqua", Palatino, "Palatino Linotype", serif;
}

body {
    font-family: "Bookman Old Style", "Book Antiqua", Palatino, "Palatino Linotype", serif;
    background: linear-gradient(135deg, var(--bg-start) 0%, #ffffff 45%, var(--bg-end) 100%);
    color: var(--surface-text);
    min-height: 100vh;
}

body.app-loading-active {
    cursor: progress;
}

.app-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 5200;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(15, 79, 130, 0.2), transparent 30%),
        radial-gradient(circle at bottom left, rgba(26, 168, 91, 0.16), transparent 32%),
        rgba(248, 249, 251, 0.76);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

html.app-loading-boot .app-loading-overlay {
    opacity: 1;
    visibility: visible;
}

html.app-loading-boot body {
    cursor: progress;
}

.app-loading-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.app-loading-overlay[data-loading-mode="async"] {
    pointer-events: none;
}

.app-loading-overlay[data-loading-mode="async"] .app-loading-card {
    opacity: 0.92;
}

.app-loading-card {
    width: min(420px, calc(100vw - 2rem));
    padding: 1.25rem 1.35rem;
    border: 1px solid rgba(216, 225, 235, 0.95);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 60px rgba(18, 44, 68, 0.2);
}

.app-loading-visual {
    position: relative;
    height: 122px;
    margin-bottom: 1rem;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(246, 249, 252, 0.95) 0%, rgba(231, 239, 246, 0.92) 100%);
    border: 1px solid rgba(216, 225, 235, 0.95);
}

.app-loading-visual::before {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 34px;
    background: linear-gradient(180deg, rgba(242, 162, 42, 0.08) 0%, rgba(242, 162, 42, 0.18) 100%);
}

.app-loading-bars {
    position: absolute;
    inset: 16px 18px 18px 18px;
    display: flex;
    align-items: end;
    gap: 10px;
}

.app-loading-bars span {
    width: 18px;
    border-radius: 999px 999px 4px 4px;
    background: linear-gradient(180deg, rgba(242, 162, 42, 0.96) 0%, rgba(215, 131, 14, 0.96) 100%);
    transform-origin: bottom center;
    animation: app-loading-bar 1.15s ease-in-out infinite;
}

.app-loading-bars span:nth-child(1) {
    height: 32px;
    animation-delay: 0s;
}

.app-loading-bars span:nth-child(2) {
    height: 52px;
    animation-delay: 0.14s;
}

.app-loading-bars span:nth-child(3) {
    height: 74px;
    animation-delay: 0.28s;
}

.app-loading-bars span:nth-child(4) {
    height: 58px;
    animation-delay: 0.42s;
}

.app-loading-line {
    position: absolute;
    inset: 10px 10px 12px 72px;
    width: calc(100% - 82px);
    height: calc(100% - 22px);
}

.app-loading-line path {
    fill: none;
    stroke: url(#appLoadingStroke);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: app-loading-line 1.6s ease-in-out infinite;
}

.app-loading-coin {
    position: absolute;
    right: 20px;
    top: 22px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff5bf 0%, #ffd66e 35%, #f2a22a 100%);
    box-shadow: 0 8px 18px rgba(242, 162, 42, 0.28);
    animation: app-loading-coin 1.4s ease-in-out infinite;
}

.app-loading-copy {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.app-loading-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--ink);
}

.app-loading-text {
    color: var(--surface-muted);
    font-size: 0.94rem;
}

@keyframes app-loading-bar {
    0%,
    100% {
        transform: scaleY(0.78);
        opacity: 0.76;
    }

    50% {
        transform: scaleY(1.12);
        opacity: 1;
    }
}

@keyframes app-loading-line {
    0% {
        stroke-dashoffset: 220;
        opacity: 0.45;
    }

    40%,
    60% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    100% {
        stroke-dashoffset: -220;
        opacity: 0.45;
    }
}

@keyframes app-loading-coin {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-7px) scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-loading-bars span,
    .app-loading-line path,
    .app-loading-coin {
        animation: none;
    }
}

.navbar.finance-nav {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 28%),
        linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-green) 100%);
    border-bottom: 2px solid var(--brand-orange);
    position: sticky;
    top: 0;
    z-index: 3000;
    isolation: isolate;
    box-shadow: 0 4px 18px rgba(5, 33, 58, 0.22);
}

:root {
    --app-navbar-height: 64px;
}

.navbar,
.navbar * {
    pointer-events: auto;
}

.navbar.finance-nav .container-fluid {
    gap: 0.8rem;
    padding: 0.35rem 1rem;
}

.navbar.finance-nav .navbar-nav {
    gap: 0.2rem;
}

.navbar.finance-nav .nav-link {
    color: rgba(241, 247, 255, 0.9);
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.navbar.finance-nav .nav-link:hover,
.navbar.finance-nav .nav-link:focus,
.navbar.finance-nav .nav-link.show,
.navbar.finance-nav .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    text-shadow: none;
}

.navbar.finance-nav .nav-link:hover {
    /* no transform — prevents scroll jitter */
}

.navbar.finance-nav .dropdown-menu .dropend {
    position: relative;
}

.navbar.finance-nav .dropdown-menu .dropend > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: 0.3rem;
    display: none;
}

.navbar.finance-nav .dropdown-menu {
    z-index: 1090;
    border: 1px solid rgba(13, 53, 84, 0.18);
    border-radius: 0.9rem;
    margin-top: 0.55rem;
    padding: 0.45rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 34px rgba(9, 36, 61, 0.18);
}

.navbar.finance-nav .dropdown-item {
    border-radius: 0.6rem;
    padding: 0.45rem 0.62rem;
    font-weight: 500;
}

.navbar.finance-nav .dropdown-item:hover,
.navbar.finance-nav .dropdown-item:focus {
    background: rgba(15, 79, 130, 0.1);
}

.navbar.finance-nav .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.36);
}

.navbar.finance-nav .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.22);
}

.nav-utility {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 0.32rem 0.7rem;
    background: rgba(6, 31, 52, 0.26);
    line-height: 1.2;
}

@media (max-width: 991.98px) {
    :root {
        --app-navbar-height: 64px;
    }

    .navbar.finance-nav .container-fluid {
        padding: 0.35rem 0.75rem;
    }

    .navbar.finance-nav .finance-nav-collapse {
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 0.5rem;
        padding-top: 0.45rem;
    }

    .navbar.finance-nav .navbar-nav {
        gap: 0.1rem;
    }

    .navbar.finance-nav .nav-link {
        border-radius: 0.65rem;
        padding: 0.5rem 0.7rem;
    }

    .nav-utility {
        margin-top: 0.5rem;
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .user-pill {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Keep modals above the sticky navbar (z-index: 3000). */
.modal-backdrop {
    z-index: 3990 !important;
}

.modal {
    z-index: 4000 !important;
    padding-top: calc(var(--app-navbar-height) + 0.75rem) !important;
}

.modal .modal-dialog {
    margin-top: 0 !important;
}

.modal-open .navbar {
    z-index: 3000;
}

.bundle-popup {
    position: fixed;
    inset: 0;
    z-index: 4050;
    pointer-events: none;
}

.bundle-popup[hidden] {
    display: none !important;
}

.bundle-popup-window {
    position: absolute;
    top: calc(var(--app-navbar-height) + 1rem);
    left: 50%;
    width: min(1120px, calc(100vw - 1.5rem));
    max-width: calc(100vw - 1rem);
    min-width: 720px;
    height: min(78vh, 820px);
    min-height: 420px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(14, 37, 58, 0.24);
    overflow: hidden;
    pointer-events: auto;
    resize: both;
}

.bundle-popup-window.is-dragging {
    user-select: none;
}

.bundle-popup-window.is-maximized {
    top: calc(var(--app-navbar-height) + 0.5rem) !important;
    left: 0.5rem !important;
    width: calc(100vw - 1rem) !important;
    max-width: none;
    height: calc(100vh - var(--app-navbar-height) - 1rem) !important;
    resize: none;
}

.bundle-popup-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--surface-border);
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    cursor: move;
}

.bundle-popup-body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 1rem 1.1rem;
    min-height: 0;
}

.bundle-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-top: 1px solid var(--surface-border);
    background: #ffffff;
}

@media (max-width: 991.98px) {
    .bundle-popup-window {
        min-width: 0;
        width: calc(100vw - 1rem);
        height: calc(100vh - var(--app-navbar-height) - 1rem);
        top: calc(var(--app-navbar-height) + 0.5rem);
        left: 0.5rem;
        resize: none;
    }
}

.coa-directory {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.coa-directory-group {
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.88);
}

.coa-directory-subject {
    padding: 0.8rem 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    background: linear-gradient(180deg, #ffffff 0%, #eef4f8 100%);
    border-bottom: 1px solid var(--surface-border);
}

.coa-directory-list {
    display: flex;
    flex-direction: column;
}

.coa-directory-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(216, 225, 235, 0.9);
}

.coa-directory-item:last-child {
    border-bottom: none;
}

.coa-directory-copy {
    min-width: 0;
}

.coa-directory-name-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.coa-directory-name {
    font-size: 1.02rem;
    font-weight: 400;
    color: var(--surface-text);
}

.coa-directory-number,
.coa-directory-detail,
.coa-directory-description {
    color: var(--surface-muted);
}

.coa-directory-number,
.coa-directory-detail {
    font-size: 0.92rem;
}

.coa-directory-detail,
.coa-directory-description {
    margin-top: 0.18rem;
}

.coa-directory-description {
    font-size: 0.95rem;
}

.coa-directory-actions {
    flex: 0 0 auto;
}

.upgrade-status-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(244, 248, 252, 0.96) 100%);
    border: 1px solid var(--surface-border);
}

.upgrade-status-path {
    font-family: "Space Grotesk", sans-serif;
    color: var(--ink);
}

.upgrade-status-summary {
    height: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(216, 225, 235, 0.95);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
}

.upgrade-status-label {
    margin-bottom: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--surface-muted);
}

.upgrade-status-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--surface-text);
}

.upgrade-check-item {
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(216, 225, 235, 0.95);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
}

.upgrade-guide-step {
    padding: 0.85rem 0.95rem;
    border-left: 4px solid var(--ink);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
}

@media (max-width: 575.98px) {
    .coa-directory-item {
        flex-direction: column;
    }

    .coa-directory-actions {
        width: 100%;
    }

    .coa-directory-actions .btn {
        width: 100%;
    }
}

.navbar .dropdown-menu .dropend:hover > .dropdown-menu,
.navbar .dropdown-menu .dropend:focus-within > .dropdown-menu,
.navbar .dropdown-menu .dropend > .dropdown-toggle:focus + .dropdown-menu {
    display: block;
}

@media (min-width: 992px) {
    .navbar .nav-item.dropdown:hover > .dropdown-menu,
    .navbar .nav-item.dropdown:focus-within > .dropdown-menu {
        display: block;
    }

    /* Close the physical gap between the nav link and the dropdown so
       the mouse doesn't leave the hover zone while moving downward. */
    .navbar.finance-nav .dropdown-menu {
        margin-top: 0 !important;
    }

    /* Invisible bridge fills any remaining sub-pixel gap */
    .navbar.finance-nav .nav-item.dropdown > .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -10px;
        left: 0;
        right: 0;
        height: 10px;
    }
}

.navbar.finance-nav .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #ffffff;
    padding: 0;
    margin-right: 0.5rem;
}

.navbar.finance-nav .navbar-brand span {
    letter-spacing: 0.1px;
}

.org-logo.finance-logo {
    height: 44px;
    width: auto;
    max-width: 240px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.1rem 0.3rem;
    box-shadow: 0 4px 10px rgba(8, 26, 45, 0.22);
}

.navbar.finance-nav .btn {
    border-radius: 0.56rem;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .org-logo.finance-logo {
        height: 38px;
        max-width: 180px;
    }
}

.layout-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(circle at 8% 16%, var(--brand-orange) 0%, transparent 42%), radial-gradient(circle at 92% 82%, var(--brand-green) 0%, transparent 36%);
    opacity: 0.14;
}

.btn-accent {
    background: var(--accent);
    border: none;
    color: #fff;
}

.btn-accent:hover {
    background: #d68d23;
    color: #fff;
}

.hero {
    background: linear-gradient(120deg, var(--brand-blue), var(--brand-green));
    box-shadow: 0 10px 35px rgba(20, 33, 61, 0.2);
}

.dashboard-hero {
    border-radius: 1.15rem;
    padding: 1.6rem;
    color: #fff;
    background-image:
        radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.16) 0%, transparent 24%),
        radial-gradient(circle at 12% 110%, rgba(255, 255, 255, 0.12) 0%, transparent 32%),
        linear-gradient(120deg, var(--brand-blue), var(--brand-green));
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
    margin-bottom: 1rem;
}

.dashboard-hero__content {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-hero__title {
    margin: 0;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    line-height: 1.05;
    font-weight: 700;
}

.dashboard-hero__subtitle {
    margin: 0.55rem 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1rem;
}

.dashboard-hero__actions {
    display: flex;
    gap: 0.75rem;
    align-items: end;
    flex-wrap: wrap;
}

.dashboard-hero__actions label {
    color: rgba(255, 255, 255, 0.82);
}

.dashboard-hero__actions .form-select,
.dashboard-hero__actions .btn {
    min-height: 38px;
}

.dashboard-hero__actions .form-select {
    background: var(--surface-bg);
    color: var(--surface-text);
    border-color: rgba(255, 255, 255, 0.28);
}

.btn-theme-hero {
    background: var(--surface-bg);
    color: var(--brand-blue);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-weight: 600;
}

.btn-theme-hero:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--brand-blue);
}

.btn-theme-hero-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.btn-theme-hero-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.metric-card {
    background: var(--surface-bg);
    color: var(--surface-text);
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.09);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.metric-card h6 {
    min-height: 2.4em;
    margin-bottom: 0.5rem;
}

.metric-card .value {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: auto;
    white-space: nowrap;
}

.metric-card .value .metric-value-link {
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    line-height: inherit;
}

.card {
    border: 0;
    background: var(--surface-bg);
    color: var(--surface-text);
    border: 1px solid var(--surface-border);
    border-radius: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    animation: slideUp 0.45s ease;
}

.text-muted,
.form-text {
    color: var(--surface-muted) !important;
}

.table {
    color: var(--surface-text);
}

.table > :not(caption) > * > * {
    background-color: transparent;
    border-bottom-color: var(--surface-border);
}

.form-control,
.form-select {
    background-color: var(--input-bg);
    color: var(--input-text);
    border-color: var(--surface-border);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--input-bg);
    color: var(--input-text);
    border-color: var(--brand-green);
    box-shadow: 0 0 0 0.2rem rgba(52, 211, 153, 0.2);
}

.theme-dark .dropdown-menu {
    background: #111827;
    color: #e5e7eb;
    border: 1px solid #374151;
}

.theme-dark .dropdown-item {
    color: #e5e7eb;
}

.theme-dark .dropdown-item:hover,
.theme-dark .dropdown-item:focus {
    background: #1f2937;
    color: #ffffff;
}

@keyframes slideUp {
    from {
        transform: translateY(12px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-page {
    overflow: hidden;
    background: linear-gradient(135deg, rgba(242, 162, 42, 0.22), rgba(15, 79, 130, 0.18));
}

.glass-card {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.65);
}

.login-page .language-dropdown {
    position: relative;
    display: flex;
    justify-content: flex-end;
    margin: 0 0 1.25rem;
}

.login-page .language-dropdown .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0.45rem 0.7rem;
    border: 1px solid #b8c9d8;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #154d75;
    font-weight: 600;
}

.login-page .language-dropdown .dropdown-toggle:hover,
.login-page .language-dropdown .dropdown-toggle:focus,
.login-page .language-dropdown .dropdown-toggle:active {
    background: #ffffff;
    color: #0f4f82;
    border-color: #7ea8c8;
    box-shadow: 0 5px 14px rgba(15, 79, 130, 0.12);
}

.login-page .language-dropdown .language-menu-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #607487;
}

.login-page .language-dropdown .language-flag {
    display: inline-flex;
    width: 28px;
    height: 20px;
    flex: 0 0 28px;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(21, 77, 117, 0.15);
}

.login-page .language-dropdown .language-flag svg {
    display: block;
    width: 100%;
    height: 100%;
}

.login-page .language-dropdown .language-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.login-page .language-dropdown .dropdown-menu {
    min-width: 170px;
    margin-top: 0.4rem;
    padding: 0.35rem;
    border: 1px solid #d7e0e8;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(24, 54, 78, 0.16);
}

.login-page .language-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.65rem;
    border-radius: 7px;
    color: #18384e;
}

.login-page .language-dropdown .dropdown-item:hover,
.login-page .language-dropdown .dropdown-item:focus,
.login-page .language-dropdown .dropdown-item.active {
    background: #edf5fa;
    color: #0f4f82;
}

@media (max-width: 480px) {
    .login-page .language-dropdown {
        justify-content: center;
    }
}

.blob {
    width: 420px;
    height: 420px;
    position: fixed;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
    z-index: -1;
}

.blob.a {
    top: -120px;
    left: -70px;
    background: var(--brand-orange);
}

.blob.b {
    bottom: -130px;
    right: -80px;
    background: var(--brand-green);
}

/* Shared warm editor theme: Proposal, Project, Invoice */
:root {
    --fz-editor-bg: #fff8e7;
    --fz-editor-header-bg: #f7f1df;
    --fz-editor-body-bg: #efe9d8;
    --fz-editor-border: #d9d1bf;
    --fz-editor-input-bg: #f2f2f2;
    --fz-editor-input-border: #c9d2ce;
    --fz-editor-input-focus: #8ea9a2;
    --fz-editor-text: #10242a;
    --fz-editor-title: #132a30;
    --fz-editor-th-bg: #efe6cf;
    --fz-editor-th-border: #cdbf9f;
    --fz-editor-th-text: #122d34;
    --fz-editor-row-bg: rgba(255, 255, 255, 0.35);
    --fz-editor-row-hover-bg: rgba(255, 255, 255, 0.55);
    --fz-editor-outline-btn-bg: #f6f1e2;
    --fz-editor-tip: #4e5e5b;
}

.fz-editor-theme {
    background: var(--fz-editor-body-bg);
    border: 1px solid var(--fz-editor-border);
}

.modal.fz-editor-theme {
    background: #ffffff;
    border: 0;
}

.fz-editor-theme .modal-content,
.fz-editor-card {
    background: var(--fz-editor-bg);
    border: 1px solid var(--fz-editor-border);
}

.fz-editor-theme .modal-header,
.fz-editor-theme .modal-footer,
.fz-editor-card-header,
.fz-editor-card-footer {
    background: var(--fz-editor-header-bg);
    border-color: var(--fz-editor-border);
}

.fz-editor-theme .modal-title,
.fz-editor-title {
    font-weight: 700;
    color: var(--fz-editor-title);
}

.fz-editor-theme .modal-body,
.fz-editor-body {
    background: var(--fz-editor-body-bg);
}

.fz-editor-theme .form-control,
.fz-editor-theme .form-select,
.fz-editor-card .form-control,
.fz-editor-card .form-select {
    background: var(--fz-editor-input-bg);
    border: 1px solid var(--fz-editor-input-border);
    color: var(--fz-editor-text);
}

.fz-editor-theme .form-control:focus,
.fz-editor-theme .form-select:focus,
.fz-editor-card .form-control:focus,
.fz-editor-card .form-select:focus {
    border-color: var(--fz-editor-input-focus);
    box-shadow: 0 0 0 0.15rem rgba(101, 141, 132, 0.2);
}

.fz-editor-theme .btn-outline-primary,
.fz-editor-theme .btn-outline-secondary,
.fz-editor-theme .btn-outline-danger,
.fz-editor-theme .btn-outline-success,
.fz-editor-theme .btn-outline-warning,
.fz-editor-card .btn-outline-primary,
.fz-editor-card .btn-outline-secondary,
.fz-editor-card .btn-outline-danger,
.fz-editor-card .btn-outline-success,
.fz-editor-card .btn-outline-warning {
    background: var(--fz-editor-outline-btn-bg);
}

.btn-flowzio,
.btn:not(.btn-link):not(.btn-close):not(.btn-theme-hero):not(.btn-theme-hero-outline) {
    border-radius: 1rem;
    border: 1px solid color-mix(in srgb, var(--brand-blue) 38%, var(--surface-border));
    background: #ffffff;
    color: var(--brand-blue);
    font-weight: 700;
    text-shadow: none;
    box-shadow: 0 8px 18px rgba(18, 38, 63, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, filter 0.18s ease;
}

.btn-flowzio.btn-sm,
.btn.btn-sm:not(.btn-link):not(.btn-close):not(.btn-theme-hero):not(.btn-theme-hero-outline) {
    border-radius: 0.85rem;
}

.btn-flowzio.btn-lg,
.btn.btn-lg:not(.btn-link):not(.btn-close):not(.btn-theme-hero):not(.btn-theme-hero-outline) {
    border-radius: 1.15rem;
}

.btn-flowzio:hover,
.btn-flowzio:focus-visible,
.btn-flowzio:active,
.btn:not(.btn-link):not(.btn-close):not(.btn-theme-hero):not(.btn-theme-hero-outline):hover,
.btn:not(.btn-link):not(.btn-close):not(.btn-theme-hero):not(.btn-theme-hero-outline):focus-visible,
.btn:not(.btn-link):not(.btn-close):not(.btn-theme-hero):not(.btn-theme-hero-outline):active,
.btn-check:checked + .btn:not(.btn-link):not(.btn-close):not(.btn-theme-hero):not(.btn-theme-hero-outline),
.show > .btn.dropdown-toggle:not(.btn-link):not(.btn-close):not(.btn-theme-hero):not(.btn-theme-hero-outline) {
    border-color: color-mix(in srgb, var(--brand-blue) 62%, var(--brand-green));
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
    color: #ffffff;
    box-shadow: 0 14px 24px color-mix(in srgb, var(--brand-blue) 24%, transparent);
    filter: saturate(1.04) brightness(1.01);
    transform: translateY(-1px);
}

.btn-flowzio:focus-visible,
.btn:not(.btn-link):not(.btn-close):not(.btn-theme-hero):not(.btn-theme-hero-outline):focus-visible {
    outline: 0;
}

.btn-flowzio[disabled],
.btn-flowzio.disabled,
.btn:not(.btn-link):not(.btn-close):not(.btn-theme-hero):not(.btn-theme-hero-outline)[disabled],
.btn:not(.btn-link):not(.btn-close):not(.btn-theme-hero):not(.btn-theme-hero-outline).disabled {
    opacity: 0.62;
    box-shadow: none;
    filter: grayscale(0.16);
    transform: none;
    cursor: not-allowed;
}

.theme-dark .btn-flowzio,
.theme-dark .btn:not(.btn-link):not(.btn-close):not(.btn-theme-hero):not(.btn-theme-hero-outline) {
    background: color-mix(in srgb, #ffffff 92%, var(--surface-bg));
    border-color: color-mix(in srgb, var(--brand-blue) 42%, var(--surface-border));
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.24);
}

.fz-editor-table {
    border-collapse: separate;
    border-spacing: 0;
}

.fz-editor-table thead th {
    background: var(--fz-editor-th-bg);
    color: var(--fz-editor-th-text);
    border-bottom: 1px solid var(--fz-editor-th-border);
    white-space: nowrap;
}

.fz-editor-table tbody td {
    background: var(--fz-editor-row-bg);
    border-bottom: 1px solid #ddd2bb;
}

.fz-editor-table tbody tr:hover td {
    background: var(--fz-editor-row-hover-bg);
}

.fz-editor-summary-input {
    font-weight: 700;
    background: #ecefe8;
    border: 1px solid var(--fz-editor-input-border);
    color: #1b2d2d;
}

.fz-editor-tip {
    color: var(--fz-editor-tip);
}

.project-edit-form.fz-editor-theme,
.project-editor-panel.fz-editor-theme {
    border-radius: 8px;
}

.project-install-period.fz-editor-theme {
    background: var(--fz-editor-header-bg);
}

/* Dashboard metric alignment: fixed title row and shared value baseline. */
.metric-card{display:flex;height:100%;flex-direction:column}
.metric-card h6{height:2.4em;min-height:2.4em;margin-bottom:.5rem;overflow:hidden;line-height:1.2}
.metric-card .value{display:flex;min-height:1.2em;align-items:baseline;margin-top:auto;line-height:1.2;white-space:nowrap}
.metric-card .value .metric-value-link{display:inline-flex;align-items:baseline}

/* Use one font with a native peso glyph so currency symbols and digits share a baseline. */
.metric-card .value{font-family:Cambria,"Segoe UI",sans-serif}

.flowzio-assistant {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 4800;
    font-family: "Bookman Old Style", "Book Antiqua", Palatino, serif;
}
body.popup-edit-mode .flowzio-assistant,
body.desktop-embed-mode .flowzio-assistant {
    display: none !important;
}
.flowzio-assistant-launcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 16px 8px 8px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-blue) 0%, #147a68 58%, var(--brand-green) 100%);
    box-shadow: 0 16px 40px rgba(15, 79, 130, 0.28);
    cursor: pointer;
}
.flowzio-assistant-launcher-glow {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.flowzio-assistant-launcher-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}
.flowzio-assistant-launcher-icon svg {
    width: 22px;
    height: 22px;
}
.flowzio-assistant-launcher-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding-right: 6px;
}
.flowzio-assistant.is-open .flowzio-assistant-launcher {
    display: none;
}
.flowzio-assistant-panel {
    width: min(400px, calc(100vw - 28px));
    height: min(560px, calc(100vh - 40px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(216, 225, 235, 0.95);
    border-radius: 22px;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 28%);
    box-shadow: 0 28px 70px rgba(12, 42, 65, 0.28);
}
.flowzio-assistant-head {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 16px 16px 14px;
    color: #fff;
    background: linear-gradient(120deg, var(--brand-blue), #0f6a63 70%, var(--brand-green));
}
.flowzio-assistant-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}
.flowzio-assistant-kicker {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.82;
}
.flowzio-assistant-head h2 {
    margin: 0;
    font-size: 18px;
}
.flowzio-assistant-sub {
    margin: 2px 0 0;
    font-size: 12px;
    opacity: 0.88;
}
.flowzio-assistant-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 22px;
    line-height: 1;
}
.flowzio-assistant-thread {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 14px 10px;
    background:
        radial-gradient(circle at 100% 0, rgba(242, 162, 42, 0.08), transparent 34%),
        #f5f8fb;
}
.flowzio-assistant-bubble {
    max-width: 88%;
    padding: 11px 13px;
    border-radius: 16px;
    line-height: 1.45;
    font-size: 14px;
    color: var(--surface-text);
    box-shadow: 0 8px 20px rgba(20, 44, 68, 0.06);
}
.flowzio-assistant-bubble p {
    margin: 0;
    white-space: pre-wrap;
}
.flowzio-assistant-bubble.is-assistant {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e4edf4;
    border-left: 3px solid var(--brand-green);
}
.flowzio-assistant-bubble.is-user {
    align-self: flex-end;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-blue), #155e7a);
}
.flowzio-assistant-bubble.is-thinking {
    color: #6a7b8c;
    font-style: italic;
}
.flowzio-assistant-compose {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-top: 1px solid #e6eef5;
}
.flowzio-assistant-compose textarea {
    width: 100%;
    min-height: 46px;
    max-height: 110px;
    padding: 10px 12px;
    resize: none;
    border: 1px solid #d5e0ea;
    border-radius: 14px;
    background: #f8fbfe;
    color: var(--surface-text);
}
.flowzio-assistant-send {
    align-self: end;
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--brand-orange);
    font-weight: 700;
}
.theme-dark .flowzio-assistant-panel {
    background: #142433;
    border-color: #2a3d50;
}
.theme-dark .flowzio-assistant-thread {
    background: #101c28;
}
.theme-dark .flowzio-assistant-bubble.is-assistant {
    background: #1b2c3c;
    border-color: #31485c;
    color: #e8eef4;
}
.theme-dark .flowzio-assistant-compose {
    background: #142433;
    border-top-color: #2a3d50;
}
.theme-dark .flowzio-assistant-compose textarea {
    background: #101c28;
    border-color: #31485c;
    color: #e8eef4;
}
@media (max-width: 576px) {
    .flowzio-assistant {
        right: 12px;
        bottom: 12px;
    }
    .flowzio-assistant-launcher-text {
        display: none;
    }
    .flowzio-assistant-launcher {
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
    }
}

.hospitality-room-type-section {
    margin-bottom: 1.35rem;
    padding: 1rem 1rem 1.1rem;
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    background: rgba(15, 79, 130, 0.035);
}
.hospitality-room-type-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--brand-blue);
}
.hospitality-room-type-kicker {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #66758a;
    font-weight: 700;
}
.hospitality-room-type-title {
    margin: 0.1rem 0 0;
    font-size: 1.25rem;
    color: #17324a;
}
.hospitality-room-type-count {
    font-size: 0.9rem;
    color: #4a5d73;
    white-space: nowrap;
}
.hospitality-room-card {
    display: block;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 0.95rem 1rem 0.8rem;
    background: var(--surface-bg);
    min-height: 8.4rem;
    box-shadow: 0 1px 0 rgba(15, 79, 130, 0.04);
}
.hospitality-room-number {
    font-size: 1.7rem;
    line-height: 1;
    font-weight: 700;
    color: #17324a;
}
.hospitality-room-guest { margin-top: 0.45rem; font-weight: 600; }
.hospitality-room-balance { margin-top: 0.2rem; font-weight: 700; color: #0f4f82; }
.hospitality-room-action {
    margin-top: 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #0f4f82;
}
.hospitality-folio-balance {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f4f82;
    margin-bottom: 0.2rem;
}
.hospitality-folio-card summary { cursor: pointer; }
.hospitality-room-card:hover { border-color: var(--brand-blue); }
.hospitality-room-card .badge { font-weight: 500; }
.hospitality-room-card.status-available { border-left: 6px solid #1aa85b; }
.hospitality-room-card.status-occupied,
.hospitality-room-card.status-departing,
.hospitality-room-card.status-late_checkout { border-left: 6px solid #0f4f82; }
.hospitality-room-card.status-reserved,
.hospitality-room-card.status-arriving { border-left: 6px solid #f2a22a; }
.hospitality-room-card.status-vacant_dirty,
.hospitality-room-card.status-cleaning { border-left: 6px solid #8a6d3b; }
.hospitality-room-card.status-maintenance,
.hospitality-room-card.status-out_of_order,
.hospitality-room-card.status-blocked { border-left: 6px solid #e63946; }
.hospitality-calendar-table th,
.hospitality-calendar-table td { min-width: 72px; }
.hospitality-cal-busy { background: rgba(15, 79, 130, 0.12); }
.hospitality-cal-free a { text-decoration: none; }


