body {
    font-size: .875rem;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 0;
    background: transparent;
    white-space: nowrap;
}

.theme-toggle-glyph {
    width: 1rem;
    font-size: 1.1rem;
    line-height: 1;
    text-align: center;
}

.theme-toggle-glyph::before {
    content: "☾";
}

[data-bs-theme="dark"] .theme-toggle-glyph::before {
    content: "☀";
}

.theme-toggle-floating {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    padding: .45rem .7rem;
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--bs-box-shadow-sm);
}

.theme-toggle-floating:hover {
    color: var(--bs-emphasis-color);
    background: var(--bs-tertiary-bg);
}

.feather {
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
}

.top-menu {
    position: relative;
    top: 0;
    z-index: 1010;
}

.top-menu-inner {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    min-height: 3.35rem;
    gap: .5rem;
}

.top-menu-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 2.35rem;
    padding: 0 .75rem 0 0;
}

.top-menu-brand img {
    display: block;
    max-height: 30px;
    width: auto;
}

.top-menu-scroll {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
}

.top-menu-nav {
    align-items: center;
    flex-wrap: nowrap;
    min-width: max-content;
}

.top-menu-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 2.35rem;
    padding: .4rem .75rem;
    font-weight: 500;
    color: #fff;
    line-height: 1;
    white-space: nowrap;
}

.top-menu-dropdown-menu {
    min-width: 14rem;
    --bs-dropdown-font-size: .875rem;
}

.top-menu-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .75rem;
    font-weight: 500;
}

.top-menu-link .feather {
    color: rgba(255, 255, 255, .82);
}

.top-menu-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .16);
    border-radius: .25rem;
}

.top-menu-link:hover .feather,
.top-menu-link.active .feather {
    color: inherit;
}

.top-menu-link:hover {
    color: #fff;
}

.top-menu-signout {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
}

.top-menu .theme-toggle {
    flex: 0 0 auto;
}

.top-menu-signout-button {
    border: 0;
    background: transparent;
    appearance: none;
}

.navbar-brand {
    padding-top: .75rem;
    padding-bottom: .75rem;
    font-size: 1rem;
}

.navbar .form-control {
    padding: .75rem 1rem;
    border-width: 0;
    border-radius: 0;
}

.form-control-dark {
    color: #fff;
    background-color: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .1);
}

.form-control-dark:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

.bg-brand{
    background-color: #62a134;
}

.fc .fc-button {
    background-color: #62a134; /* your custom colour */
    border: none;
    color: white;
}

.fc .fc-button:hover {
    background-color: #62a134;
}

.fc .fc-button.fc-button-active {
    background-color: #62a134;
    color: #fff;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.jsgrid-cell,
.jsgrid-header-cell {
    padding: 0.75rem !important;
    border: 1px solid var(--bs-border-color) !important;
    font-size: 0.9rem;
}

.jsgrid-grid-header {
    padding-right: 15px;
    box-sizing: border-box;
}

.jsgrid-grid-header,
.jsgrid-grid-body {
    overflow: auto;
}

.jsgrid-row:hover {
    background-color: var(--bs-tertiary-bg);
}

.jsgrid-grid-body {
    overflow-y: scroll;
    max-height: 64vh;
    box-sizing: content-box;
}

.jsgrid-pager {
    text-align: center;
}

.jsgrid-filter-row input {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    font-size: 0.85rem;
}

[data-bs-theme="dark"] body {
    background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] table.dataTable tbody tr:hover > * {
    background-color: var(--bs-tertiary-bg) !important;
}

[data-bs-theme="dark"] .stat-card,
[data-bs-theme="dark"] .invoice-panel,
[data-bs-theme="dark"] .invoice-person-button,
[data-bs-theme="dark"] .invoice-initiative-tile,
[data-bs-theme="dark"] .invoice-line-row,
[data-bs-theme="dark"] .invoice-ticket-search-result,
[data-bs-theme="dark"] .invoice-totals-bar {
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .invoiceable-day,
[data-bs-theme="dark"] .invoiceable-day-header,
[data-bs-theme="dark"] .invoiceable-row,
[data-bs-theme="dark"] .invoice-ticket-search-results,
[data-bs-theme="dark"] .invoice-ticket-search-result {
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .invoiceable-day-header {
    background: var(--bs-tertiary-bg);
}

[data-bs-theme="dark"] .invoiceable-row.selected,
[data-bs-theme="dark"] .invoice-ticket-search-result:hover,
[data-bs-theme="dark"] .invoice-ticket-search-result.active {
    background: rgba(var(--bs-success-rgb), .12);
}

[data-bs-theme="dark"] .invoiceable-row.has-lines {
    background: rgba(var(--bs-success-rgb), .16);
}

[data-bs-theme="dark"] .invoiceable-row.has-lines.selected {
    background: rgba(var(--bs-success-rgb), .22);
}

[data-bs-theme="dark"] #dashboardStats .card {
    background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .ts-control,
[data-bs-theme="dark"] .ts-wrapper.single.input-active .ts-control,
[data-bs-theme="dark"] .ts-dropdown,
[data-bs-theme="dark"] .ts-dropdown .create {
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .ts-control > input {
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .ts-dropdown .active {
    color: var(--bs-emphasis-color);
    background-color: var(--bs-tertiary-bg);
}

[data-bs-theme="dark"] .ts-wrapper.plugin-remove_button .item .remove {
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .fc {
    --fc-page-bg-color: var(--bs-body-bg);
    --fc-neutral-bg-color: var(--bs-tertiary-bg);
    --fc-neutral-text-color: var(--bs-secondary-color);
    --fc-border-color: var(--bs-border-color);
    --fc-list-event-hover-bg-color: var(--bs-tertiary-bg);
}

[data-bs-theme="dark"] .fc .hours-label {
    color: var(--bs-secondary-color) !important;
}

[data-bs-theme="dark"] .backlog-link-open {
    color: var(--bs-warning-text-emphasis);
    background: var(--bs-warning-bg-subtle);
}

[data-bs-theme="dark"] .backlog-row [data-field="status"] {
    border-color: var(--bs-border-color);
}

@media (max-width: 1199.98px) {
    .theme-toggle-label {
        display: none;
    }
}

.required-after:after {
    content: "*";
    font-weight: bolder;
    color: #e80c4d;
    margin-left: 5px;
}

.form-label.required-after {
    display: inline-flex;
    align-items: center;
}
