.sb-topnav .navbar-brand img {
    width: 100%;
    max-width: 180px;
    height: auto;
}

.dropdown-user-summary {
    width: 100%;
    max-width: 250px;
}

.user-menu-dropdown {
    width: 250px;
    min-width: 250px;
}

.dropdown-user-avatar {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 2rem;
    line-height: 1;
}

.dropdown-user-meta {
    min-width: 0;
}

.dropdown-user-name {
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.25;
    word-break: break-word;
}

.dropdown-user-role {
    font-size: 0.78rem;
    line-height: 1.2;
}

.app-launch-splash {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at top, #f4f8f6 0%, #dbe7df 38%, #becfc5 100%);
    opacity: 1;
    transition: opacity 220ms ease;
}

.kps-standalone .app-launch-splash {
    display: flex;
}

.kps-standalone.kps-splash-seen .app-launch-splash {
    display: none;
}

.app-launch-splash.is-hiding {
    opacity: 0;
}

.app-launch-splash__card {
    text-align: center;
}

.app-launch-splash__logo {
    width: 74px;
    height: 74px;
    margin: 0 auto 12px;
    border-radius: 18px;
    background: #0d6efd;
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    line-height: 74px;
    box-shadow: 0 14px 30px rgba(13, 110, 253, 0.3);
}

.app-launch-splash__title {
    margin: 0;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #18211c;
}

.app-launch-splash__subtitle {
    margin: 4px 0 0;
    color: #4d5a53;
    letter-spacing: 0.03em;
}

.app-install-gate {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at top, #f4f8f6 0%, #dbe7df 38%, #becfc5 100%);
}

.app-install-card {
    width: min(460px, 100%);
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
    text-align: center;
    border: 1px solid #d6e1da;
}

.app-install-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: #0d6efd;
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    line-height: 64px;
}

.app-install-card h2 {
    margin-bottom: 8px;
    font-size: 1.35rem;
}

.app-install-subtitle {
    color: #4d5a53;
    margin-bottom: 16px;
}

.app-install-steps {
    text-align: left;
    background: #f2f7f4;
    border: 1px solid #d8e4dd;
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    color: #2f3a34;
}

.push-permission-gate {
    position: fixed;
    inset: 0;
    z-index: 2150;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 24, 39, 0.58);
}

.push-permission-card {
    width: min(440px, 100%);
    background: #ffffff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.3);
    border: 1px solid #dbe5ea;
}

.push-permission-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d6efd;
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.push-permission-card h2 {
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.push-permission-subtitle {
    color: #4b5563;
    margin-bottom: 14px;
}

.push-permission-status {
    background: #fff6d8;
    border: 1px solid #f5df94;
    color: #7a5c00;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.kps-footer-action {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 2050;
}

.kps-footer-action__content {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    border-radius: 999px;
    background: rgba(33, 37, 41, 0.95);
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    font-size: 0.875rem;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .kps-footer-action {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .kps-footer-action__content {
        width: 100%;
        justify-content: center;
        border-radius: 12px;
    }
}

.kps-mobile-dock {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    z-index: 2040;
    background: #fff;
    border: 1px solid #dfe3e7;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 8px 6px 6px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    will-change: transform, opacity;
}

.kps-mobile-dock__item {
    appearance: none;
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #2d3436;
    text-decoration: none;
    text-align: center;
    min-height: 56px;
    border-radius: 12px;
    transition: background-color 0.15s ease, color 0.15s ease;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.1;
}

.kps-mobile-dock__icon {
    font-size: 1.1rem;
    line-height: 1;
    color: #1d1d1f;
}

a.kps-mobile-dock__item:hover,
button.kps-mobile-dock__item:hover,
a.kps-mobile-dock__item:active,
button.kps-mobile-dock__item:active,
a.kps-mobile-dock__item:focus-visible,
button.kps-mobile-dock__item:focus-visible {
    color: #198754;
}

a.kps-mobile-dock__item:hover .kps-mobile-dock__icon,
button.kps-mobile-dock__item:hover .kps-mobile-dock__icon,
a.kps-mobile-dock__item:active .kps-mobile-dock__icon,
button.kps-mobile-dock__item:active .kps-mobile-dock__icon,
a.kps-mobile-dock__item:focus-visible .kps-mobile-dock__icon,
button.kps-mobile-dock__item:focus-visible .kps-mobile-dock__icon {
    color: #198754;
}

.kps-mobile-dock__item.is-active,
.kps-mobile-dock__item[aria-current="page"],
.kps-mobile-dock__item.is-open {
    background: #eef8f2;
    color: #198754;
}

.kps-mobile-dock__item.is-active .kps-mobile-dock__icon,
.kps-mobile-dock__item[aria-current="page"] .kps-mobile-dock__icon,
.kps-mobile-dock__item.is-open .kps-mobile-dock__icon {
    color: #198754;
}

.kps-mobile-dock.kps-mobile-dock--compact {
    left: auto;
    right: 12px;
    width: 58px;
    grid-template-columns: minmax(0, 1fr);
    padding: 6px;
    border-radius: 999px;
}

.kps-mobile-dock.kps-mobile-dock--compact .kps-mobile-dock__item {
    display: none;
}

.kps-mobile-dock.kps-mobile-dock--compact .kps-mobile-dock__menu {
    display: flex;
    min-height: 46px;
    border-radius: 999px;
    gap: 0;
}

.kps-mobile-dock.kps-mobile-dock--compact .kps-mobile-dock__menu span {
    display: none;
}

@media (max-width: 991.98px) {
    body.sb-sidenav-toggled .kps-mobile-dock {
        transform: translateY(calc(100% + 20px));
        opacity: 0;
        pointer-events: none;
    }

    body.sb-nav-fixed #layoutSidenav #layoutSidenav_content {
        padding-bottom: calc(102px + env(safe-area-inset-bottom));
    }

    .kps-footer-action {
        bottom: calc(114px + env(safe-area-inset-bottom));
    }
}

@media (min-width: 992px) {
    .kps-mobile-dock {
        display: none !important;
    }
}
