.rs-app-header {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8f00 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: calc(0.85rem + env(safe-area-inset-top, 0px)) 1rem 1.15rem;
    box-shadow: 0 2px 12px rgba(255, 107, 0, 0.3);
}

.rs-app-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.rs-app-header-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.rs-app-header-title {
    color: #4f2dbd;
    font-size: 1.15rem;
    font-weight: 950;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.rs-app-header-title .brand-sathi {
    color: #fff7ed;
}

/* Shared Kapdio header used by operational pages. */
.rs-app-header.kapdio-app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: calc(0.8rem + env(safe-area-inset-top, 0px)) 1.25rem 0.8rem;
    border-bottom: 1px solid rgba(231, 233, 238, 0.9);
    background: rgba(255, 255, 255, 0.97);
    color: #101828;
    box-shadow: none;
    backdrop-filter: blur(14px);
}

.kapdio-app-header .kapdio-wordmark {
    display: block;
    width: 104px;
    height: 36px;
    object-fit: contain;
    object-position: left center;
}

.kapdio-header-divider {
    width: 1px;
    height: 24px;
    flex: 0 0 1px;
    background: #d0d5dd;
}

.kapdio-header-title {
    color: #101828;
    font-family: 'Hind', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
}

.kapdio-app-header .rs-header-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f2f4f7;
    color: #101828;
    box-shadow: none;
}

.kapdio-app-header .rs-header-icon i { font-size: 1.35rem; }

.rs-rakhi-icon {
    width: 7rem;
    height: 2.15rem;
    object-fit: fill;
    flex: 0 0 auto;
    margin-left: -0.1rem;
    padding: 0.05rem 0.12rem;
    box-sizing: border-box;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.92) 0 38%, rgba(255, 255, 255, 0) 62%);
}

.rs-header-icon {
    background: rgba(255, 255, 255, 0.94);
    color: #ff6b00;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(154, 52, 18, 0.18);
    transition: transform 0.15s ease;
}

.rs-header-icon:active {
    transform: scale(0.92);
}

.rs-header-icon i {
    font-size: 1.25rem;
    line-height: 1;
}

.rs-header-logout {
    border-radius: 50%;
}

.header-menu-wrap {
    position: relative;
}

.header-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 150px;
    background: #fff;
    color: #1f2937;
    border-radius: 14px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.18);
    padding: 0.35rem;
    display: none;
    z-index: 1200;
}

.header-menu.open {
    display: block;
}

body .header-menu.account-menu {
    top: calc(100% + 0.65rem);
    width: min(230px, calc(100vw - 1.5rem));
    min-width: 0;
    padding: 0.55rem;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.16);
}

body .account-menu-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem;
}

body .account-menu-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 50%;
    background: #e7f2ff;
    color: #1677c8;
    font-size: 0.88rem;
    font-weight: 850;
}

body .account-menu-identity {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.1rem;
}

body .account-menu-identity strong,
body .account-menu-identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body .account-menu-identity strong { color: #101828; font-size: 0.95rem; font-weight: 800; }
body .account-menu-identity small { color: #667085; font-size: 0.78rem; font-weight: 600; }
body .account-menu-divider { height: 1px; margin: 0.35rem 0; background: #eaecf0; }

body .header-menu.account-menu .header-menu-item {
    min-height: 44px;
    gap: 0.7rem;
    padding: 0.7rem;
    border-radius: 6px;
    color: #344054;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

body .header-menu.account-menu .header-menu-item i {
    width: 42px;
    color: #667085;
    font-size: 1.05rem;
    text-align: center;
}

body .header-menu.account-menu .header-menu-item:hover,
body .header-menu.account-menu .header-menu-item:focus-visible { background: #f9fafb; }
body .header-menu.account-menu .header-menu-item.logout { background: #fff5f5; color: #d92d20; }
body .header-menu.account-menu .header-menu-item.logout i { color: #d92d20; }

.header-menu-item {
    width: 100%;
    border: none;
    background: transparent;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.header-menu-item:active {
    background: #fff7ed;
}

.header-menu-item.logout {
    color: #dc2626;
}
