/* OkeyBo admin brand */
.sidebar-brand {
    min-height: 64px;
}

#jazzy-logo.brand-link {
    align-items: center;
    display: flex;
    min-width: 0;
    overflow: hidden;
    padding: 0.75rem 1rem;
    width: 100%;
}

#jazzy-logo .okeybo-brand-logo {
    background: #18aa9a;
    border-radius: 10px;
    box-shadow: none !important;
    flex: 0 0 38px;
    height: 38px;
    margin-left: 0;
    margin-right: 0.75rem;
    object-fit: contain;
    opacity: 1 !important;
    padding: 5px;
    width: 38px;
}

#jazzy-logo .brand-text {
    color: #f8fafc;
    display: block;
    font-size: 1.05rem;
    font-weight: 600 !important;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-collapse #jazzy-logo.brand-link {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.sidebar-collapse #jazzy-logo .okeybo-brand-logo {
    margin-right: 0;
}

/* Login page logo */
.login-page .login-box {
    width: min(420px, calc(100vw - 2rem));
}

.login-page .login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    text-align: center;
}

.login-page .login-logo img {
    background: #18aa9a;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
    display: inline-block;
    height: 104px;
    object-fit: contain;
    padding: 14px;
    width: 104px;
}

.login-page .login-logo img.logo-dark {
    display: none;
}

html[data-bs-theme="dark"] .login-page .login-logo img.logo-light {
    display: none;
}

html[data-bs-theme="dark"] .login-page .login-logo img.logo-dark {
    display: inline-block;
}

/* Sidebar polish */
#jazzy-sidebar .nav-sidebar .nav-link {
    border-radius: 0.5rem;
    margin: 0.125rem 0.5rem;
}

#jazzy-sidebar .nav-sidebar .nav-link.active {
    background: #18aa9a;
    color: #fff;
}

#jazzy-sidebar .nav-sidebar .nav-icon {
    color: inherit;
    opacity: 0.9;
}

/* Dashboard KPI cards */
.okeybo-dashboard-title {
    color: #111827;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.okeybo-stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 1.5rem;
}

.okeybo-stat-card {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--card-color);
    border-radius: 0.75rem;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    display: flex;
    gap: 0.875rem;
    padding: 1rem;
}

.okeybo-stat-card__icon {
    align-items: center;
    background: color-mix(in srgb, var(--card-color) 14%, white);
    border-radius: 0.625rem;
    color: var(--card-color);
    display: inline-flex;
    flex: 0 0 42px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.okeybo-stat-card__label {
    color: #6b7280;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
}

.okeybo-stat-card__value {
    color: #111827;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.15;
    margin-top: 0.25rem;
}

.okeybo-stat-card__sub {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* List badges */
.okeybo-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.375rem 0.625rem;
    text-transform: capitalize;
    white-space: nowrap;
}

.okeybo-badge--success {
    background: #dcfce7;
    color: #166534;
}

.okeybo-badge--warning {
    background: #fef3c7;
    color: #92400e;
}

.okeybo-badge--danger {
    background: #fee2e2;
    color: #991b1b;
}

.okeybo-badge--info {
    background: #dbeafe;
    color: #1e40af;
}

.okeybo-badge--secondary {
    background: #f3f4f6;
    color: #374151;
}

/* Keep Django admin autocomplete widgets visible inside Jazzmin forms. */
.related-widget-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
}

.related-widget-wrapper .select2-container,
.select2-container--admin-autocomplete.select2-container {
    display: inline-block;
    flex: 1 1 auto;
    min-width: 240px;
    width: 100% !important;
}

.select2-container--admin-autocomplete .selection {
    display: block;
    width: 100%;
}

.select2-container--admin-autocomplete .select2-selection--single {
    align-items: center;
    background-color: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #ced4da) !important;
    border-radius: 0.375rem;
    color: var(--bs-body-color, #212529);
    display: flex;
    min-height: 38px;
    width: 100%;
}

.select2-container--admin-autocomplete .select2-selection--single .select2-selection__rendered {
    color: var(--bs-body-color, #212529);
    flex: 1 1 auto;
    line-height: 36px;
    min-width: 0;
    padding-left: 0.75rem;
    padding-right: 2rem;
}

.select2-container--admin-autocomplete .select2-selection--single .select2-selection__placeholder {
    color: var(--bs-secondary-color, #6c757d);
}

.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 0.5rem;
    top: 1px;
}

.related-widget-wrapper-link {
    flex: 0 0 auto;
}
