/* ZES-QRE platform shell — shared app chrome */
@import url('css/tokens.css');

:root {
    --header-height: 60px;
}

.app-shell-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    min-height: var(--header-height);
    padding: 12px 20px;
    background: var(--ui-header-gradient, var(--glass-surface, var(--brand-surface, var(--color-surface))));
    color: var(--brand-secondary, var(--color-text));
    border-bottom: 1px solid var(--glass-border, color-mix(in srgb, var(--ui-panel-border, var(--color-border)) 70%, transparent));
    backdrop-filter: var(--glass-blur, blur(14px) saturate(140%));
    -webkit-backdrop-filter: var(--glass-blur, blur(14px) saturate(140%));
}

.app-shell-header .header-slot {
    display: flex;
    align-items: center;
    min-width: 0;
}

.app-shell-header .header-slot-left { justify-self: start; justify-content: flex-start; }
.app-shell-header .header-logo { justify-self: center; display: flex; align-items: center; justify-content: center; }
.app-shell-header .header-logo img {
    height: 30px;
    width: auto;
    object-fit: contain;
    filter: var(--logo-filter-on-surface);
    transition: filter 0.35s ease;
}

[data-brand-logo],
.login-logo,
.header-logo img {
    filter: var(--logo-filter-on-surface);
    transition: filter 0.35s ease;
}

.brand-logo-tenant,
[data-brand-logo].brand-logo-tenant,
.header-logo img.brand-logo-tenant {
    filter: none !important;
}

.app-shell-header .header-slot-right { justify-self: end; justify-content: flex-end; }

.app-shell-header .back-btn {
    background: none;
    border: none;
    font-family: var(--font-display);
    font-size: clamp(0.85rem, 2vw, 1.05rem);
    cursor: pointer;
    color: var(--brand-accent, var(--color-accent));
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    padding: 6px 8px;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
}

.app-shell-header .back-btn:hover {
    background: color-mix(in srgb, var(--brand-accent, var(--color-accent)) 12%, transparent);
}

.app-shell-header .back-btn:active { transform: scale(0.95); }

.app-shell-fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--ui-header-gradient, var(--glass-surface, var(--brand-surface, var(--color-surface))));
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--ui-panel-shadow, var(--shadow-md));
    border-bottom: 2px solid color-mix(in srgb, var(--brand-accent, var(--color-accent)) 58%, var(--color-border));
    backdrop-filter: var(--glass-blur, blur(14px) saturate(140%));
    -webkit-backdrop-filter: var(--glass-blur, blur(14px) saturate(140%));
}

.app-shell-page-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 8px 0 12px;
}

.app-shell-page-title h1 {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 34px);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    word-spacing: 0.08em;
    line-height: 1.35;
    color: var(--brand-primary, var(--color-primary));
    margin: 0;
}

.app-shell-page-title img { height: 40px; object-fit: contain; }

.app-shell-header-home .header-slot-left {
    font-family: var(--font-display);
    font-size: 14px;
    text-transform: uppercase;
    color: var(--brand-secondary, var(--color-text));
    gap: 10px;
}

.app-shell-header-home .logout-btn {
    background: none;
    border: none;
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--brand-primary, var(--color-primary));
    cursor: pointer;
    text-transform: uppercase;
}

.app-shell-header-home .logout-btn:active { transform: scale(0.9); }

.btn-design-admin {
    display: none;
    background: var(--brand-accent, var(--color-accent));
    color: var(--btn-on-accent, #fff);
    border: none;
    font-family: var(--font-display);
    font-size: 14px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-transform: uppercase;
}

.btn-design-admin.visible { display: inline-flex; align-items: center; gap: 6px; }
