.card-header[data-bs-toggle="collapse"] {
    cursor: pointer;
    user-select: none;
}

:root[data-topbar-color=brand] {
    --abstack-topbar-bg: #0B1F33;
    --abstack-topbar-item-color: rgba(255, 255, 255, 0.9);
    --abstack-topbar-item-hover-color: #ffffff;
    --abstack-topbar-search-bg: rgba(255, 255, 255, 0.1);
    --abstack-topbar-user-bg: rgba(255, 255, 255, 0.1);
    --abstack-topbar-user-border: rgba(255, 255, 255, 0.15);
}

/* Lucide icon sizing helpers */
.icon-xs { width: 12px; height: 12px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 36px; height: 36px; }

/* Currency input group styling for money form widgets */
.currency-input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.currency-input-group .input-group-text {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-right: none;
    color: #495057;
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    border-radius: 0.375rem 0 0 0.375rem;
}

.currency-input-group input {
    border-left: none;
    border-radius: 0 0.375rem 0.375rem 0;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.currency-input-group input:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #86b7fe;
}

/* Ensure proper spacing in table cells */
td .currency-input-group {
    margin: 0;
}

/* ---- Global Search ---- */
#search-results {
    max-height: 420px;
    overflow-y: auto;
}

.search-group {
    padding: 0.25rem 0;
}

.search-group + .search-group {
    border-top: 1px solid var(--bs-border-color);
}

.search-group-label {
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color, #6c757d);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.1s;
    cursor: pointer;
}

.search-result-item:hover,
.search-result-item.active {
    background-color: var(--bs-tertiary-bg, #f8f9fa);
    color: inherit;
    text-decoration: none;
}

.search-result-icon {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
    color: var(--bs-secondary-color, #6c757d);
    flex-shrink: 0;
}

.search-result-content {
    min-width: 0;
}

.search-result-title {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-loading,
.search-no-results {
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #6c757d);
    display: flex;
    align-items: center;
}
