/* Hide light-mode things when in dark mode */
[data-bs-theme=dark] .d-light {
    display: none;
}

/* Hide dark-mode things when in light mode */
[data-bs-theme=light] .d-dark {
    display: none;
}

.tenant-detail-screenshot {
    height: 200px;
}

.org-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    overflow: hidden;
}

.org-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.6rem;
}

.org-logo-thumb {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 2px;
}

.org-logo-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.avatar-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.nav-underline .nav-link {
    color: var(--bs-secondary-color);
}

.nav-underline .nav-link.active {
    color: var(--bs-primary);
    border-bottom-color: var(--bs-primary);
}

.quick-actions .list-group-item {
    border-radius: var(--bs-border-radius);
    margin-bottom: 0.5rem;
}

.quick-actions .list-group-item:last-child {
    margin-bottom: 0;
}

.table-toolbar .input-group {
    width: auto;
    flex: 1 1 14rem;
}

.sub-header {
    background-size: cover;
    background-position: center;
}

[data-bs-theme=dark] .sub-header {
    background-image: url("/static/img/panel_bg_dark.25d75747d981.svg");
}

[data-bs-theme=light] .sub-header {
    background-image: url("/static/img/panel_bg.08f0cd5c09f5.svg");
}

.breadcrumb-chevron {
    --bs-breadcrumb-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d'%3E%3Cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    gap: .5rem;
}

.breadcrumb-chevron .breadcrumb-item {
    display: flex;
    gap: inherit;
    align-items: center;
    padding-left: 0;
    line-height: 1;
}

.breadcrumb-chevron .breadcrumb-item::before {
    gap: inherit;
    float: none;
    width: 1rem;
    height: 1rem;
    content:
}

/* ------------------------------------------------------------------ */
/* Soft blue accent palette (organization detail page and beyond)      */
/* ------------------------------------------------------------------ */
:root {
    --bs-primary: #4b7bd4;
    --bs-primary-rgb: 75, 123, 212;
    --bs-primary-bg-subtle: #eaf1fb;
    --bs-primary-border-subtle: #cbddf5;
    --bs-primary-text-emphasis: #2f5596;
    --bs-link-color: #4b7bd4;
    --bs-link-color-rgb: 75, 123, 212;
    --bs-link-hover-color: #3c68bd;
    --bs-link-hover-color-rgb: 60, 104, 189;
}

[data-bs-theme="dark"] {
    /* Lighter, near-white blue so accents read clearly on the dark ground */
    --bs-primary: #9bc0f5;
    --bs-primary-rgb: 155, 192, 245;
    --bs-primary-bg-subtle: #1c2739;
    --bs-primary-border-subtle: #3d557f;
    --bs-primary-text-emphasis: #cbdef9;
    --bs-link-color: #9bc0f5;
    --bs-link-hover-color: #c1d9fa;
}

/* Muted / secondary text a notch brighter on dark so labels stay readable */
[data-bs-theme="dark"] .text-secondary,
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-body-secondary {
    color: #a9b3bf !important;
}

/* On dark, put logos on a white plate so transparent PNGs stay visible */
[data-bs-theme="dark"] .org-avatar,
[data-bs-theme="dark"] .org-logo-thumb {
    background-color: #fff !important;
    color: #4b7bd4;
}

/* Experimental: tint the Quick Actions panel with the accent blue on dark */
[data-bs-theme="dark"] .org-quick-actions {
    background-color: rgba(95, 143, 224, 0.22) !important;
}

.btn-primary {
    --bs-btn-bg: #4b7bd4;
    --bs-btn-border-color: #4b7bd4;
    --bs-btn-hover-bg: #3c68bd;
    --bs-btn-hover-border-color: #3862b3;
    --bs-btn-active-bg: #3862b3;
    --bs-btn-active-border-color: #355ca8;
    --bs-btn-disabled-bg: #4b7bd4;
    --bs-btn-disabled-border-color: #4b7bd4;
    --bs-btn-focus-shadow-rgb: 75, 123, 212;
}

.btn-outline-primary {
    --bs-btn-color: #3c68bd;
    --bs-btn-border-color: #b9d0f0;
    --bs-btn-hover-bg: #4b7bd4;
    --bs-btn-hover-border-color: #4b7bd4;
    --bs-btn-active-bg: #4b7bd4;
    --bs-btn-active-border-color: #4b7bd4;
    --bs-btn-focus-shadow-rgb: 75, 123, 212;
}

[data-bs-theme="dark"] .btn-primary {
    --bs-btn-bg: #5f8fe0;
    --bs-btn-border-color: #5f8fe0;
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #7aa5ea;
    --bs-btn-hover-border-color: #7aa5ea;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #7aa5ea;
    --bs-btn-active-border-color: #7aa5ea;
    --bs-btn-disabled-bg: #5f8fe0;
    --bs-btn-disabled-border-color: #5f8fe0;
}

[data-bs-theme="dark"] .btn-outline-primary {
    --bs-btn-color: #b9d4fa;
    --bs-btn-border-color: #4f6f9e;
    --bs-btn-hover-bg: #5f8fe0;
    --bs-btn-hover-border-color: #5f8fe0;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #5f8fe0;
    --bs-btn-active-border-color: #5f8fe0;
    --bs-btn-active-color: #fff;
}

/* Info / primary alerts share the same soft-blue family as the page */
.alert-info,
.alert-primary {
    --bs-alert-color: #2f5596;
    --bs-alert-bg: #eaf1fb;
    --bs-alert-border-color: #cbddf5;
    --bs-alert-link-color: #274777;
}

[data-bs-theme="dark"] .alert-info,
[data-bs-theme="dark"] .alert-primary {
    --bs-alert-color: #cbdef9;
    --bs-alert-bg: #1c2739;
    --bs-alert-border-color: #3d557f;
    --bs-alert-link-color: #e3eefc;
}

/* Subtle framed box used for the header metric tiles */
.org-metric-box {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-tertiary-bg);
    padding: 0.75rem 1rem;
}

/* Dim the organization tab content while an HTMX request is in flight */
#org-tab-content.htmx-request {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

[data-bs-theme=light] .btn-square {
    --bs-btn-color: #000;
    --bs-btn-bg: #f8f9fa;
    --bs-btn-border-color: #f8f9fa;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #d3d4d5;
    --bs-btn-hover-border-color: #c6c7c8;
    --bs-btn-focus-shadow-rgb: 211, 212, 213;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #c6c7c8;
    --bs-btn-active-border-color: #babbbc;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #f8f9fa;
    --bs-btn-disabled-border-color: #f8f9fa;
}

[data-bs-theme=dark] .btn-square {
    --bs-btn-color: #fff;
    --bs-btn-bg: #212529;
    --bs-btn-border-color: #212529;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #424649;
    --bs-btn-hover-border-color: #373b3e;
    --bs-btn-focus-shadow-rgb: 66, 70, 73;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #4d5154;
    --bs-btn-active-border-color: #373b3e;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #212529;
    --bs-btn-disabled-border-color: #212529;
}

.nav .logo {
    height: 40px;
}

.profile-card {
    max-width: 720px;
}
