/* /assets/css/chimedics-app-header.css */
:root {
    --ch-app-green: #3d5a3e;
    --ch-app-green-dark: #263e2a;
    --ch-app-paper: #ffffff;
    --ch-app-line: rgba(255,255,255,.28);
}

.ch-app-header {
    position: relative;
    z-index: 900;
    width: 100%;
    background: var(--ch-app-green);
    color: #fff;
    box-shadow: 0 1px 12px rgba(20, 35, 23, .18);
}

.ch-app-header__inner {
    min-height: 72px;
    width: 100%;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
}

.ch-app-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}

.ch-app-brand img {
    width: auto;
    height: 50px;
    max-width: 126px;
    object-fit: contain;
}

.ch-app-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.ch-app-brand__text strong {
    font: 700 18px/1.05 "DM Sans", Arial, sans-serif;
    letter-spacing: .11em;
}

.ch-app-brand__text small {
    margin-top: 6px;
    font: 500 10px/1 "DM Sans", Arial, sans-serif;
    letter-spacing: .18em;
    opacity: .82;
}

.ch-app-context {
    min-width: 0;
    max-width: 380px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 500 13px/1.3 "DM Sans", Arial, sans-serif;
    opacity: .82;
}

.ch-app-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ch-app-user {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 600 14px/1.2 "DM Sans", Arial, sans-serif;
}

.ch-app-icon-button,
.ch-app-menu-button {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border: 1px solid var(--ch-app-line);
    border-radius: 12px;
    background: transparent;
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.ch-app-icon-button:hover,
.ch-app-icon-button:focus-visible,
.ch-app-menu-button:hover,
.ch-app-menu-button:focus-visible {
    background: rgba(255,255,255,.10);
    outline: none;
}

.ch-app-icon-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.ch-app-menu-button {
    align-content: center;
    gap: 5px;
    padding: 0 12px;
}

.ch-app-menu-button span {
    display: block;
    width: 23px;
    height: 2px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
}

.ch-app-menu-button.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ch-app-menu-button.is-open span:nth-child(2) { opacity: 0; }
.ch-app-menu-button.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ch-app-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 18px;
    width: min(330px, calc(100vw - 28px));
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 10px;
    background: #fff;
    color: #263e2a;
    border: 1px solid rgba(38,62,42,.22);
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(20, 35, 23, .22);
}

.ch-app-menu.is-open { display: block; }

.ch-app-menu__heading {
    padding: 11px 11px 6px;
    color: #708073;
    font: 700 11px/1.2 "DM Sans", Arial, sans-serif;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.ch-app-menu__item {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #263e2a;
    text-align: left;
    text-decoration: none;
    font: 600 14px/1.25 "DM Sans", Arial, sans-serif;
    cursor: pointer;
}

.ch-app-menu__item:hover,
.ch-app-menu__item:focus-visible,
.ch-app-menu__item.is-active {
    background: #eef3ee;
    outline: none;
}

.ch-app-menu__item.is-danger { color: #9b1c1c; }
.ch-app-hidden-status { display: none !important; }

.ch-app-lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #263e2a;
}

.ch-app-lock-overlay[hidden] { display: none; }

.ch-app-lock-card {
    width: min(420px, 100%);
    display: grid;
    gap: 14px;
    text-align: center;
    color: #fff;
}

.ch-app-lock-card strong { font-size: 26px; letter-spacing: .16em; }
.ch-app-lock-card span { font-size: 18px; opacity: .84; }
.ch-app-lock-card button {
    min-height: 52px;
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,.42);
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font: 700 15px/1 "DM Sans", Arial, sans-serif;
}

@media (max-width: 720px) {
    .ch-app-header__inner { min-height: 66px; padding: 0 12px; gap: 10px; }
    .ch-app-brand img { height: 42px; max-width: 105px; }
    .ch-app-brand__text strong { font-size: 15px; }
    .ch-app-brand__text small { font-size: 8px; }
    .ch-app-context, .ch-app-user { display: none; }
    .ch-app-icon-button, .ch-app-menu-button { width: 44px; height: 44px; flex-basis: 44px; }
    .ch-app-menu { right: 8px; }
}
