/* Shared logged-in app chrome — keep nav identical across pages */

.app-header {
    background: rgba(10, 10, 31, 0.98);
    border-bottom: 3px solid #00ff9d;
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.5);
    position: sticky;
    top: 0;
    z-index: 1030;
}

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

.app-header-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.app-header-brand:hover {
    color: inherit;
}

.app-header-brand img {
    width: 52px;
    height: 52px;
    filter: drop-shadow(0 0 20px #00ff9d);
    flex-shrink: 0;
}

.app-header-brand-text {
    margin-left: 0.75rem;
    min-width: 0;
}

.app-header-title {
    margin: 0;
    font-size: 1.75rem;
    letter-spacing: 5px;
    line-height: 1.1;
    font-weight: 700;
}

.app-header-sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
    margin-top: 0.15rem;
}

.app-header-tagline {
    color: #00ff9d;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.app-header-page-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 157, 0.45);
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.08);
    white-space: nowrap;
}

.app-header-page-label.is-admin {
    border-color: rgba(255, 0, 170, 0.55);
    color: #ff00aa;
    background: rgba(255, 0, 170, 0.1);
}

.app-header-page-label.is-report {
    border-color: rgba(255, 0, 170, 0.45);
    color: #ff00aa;
    background: rgba(255, 0, 170, 0.08);
}

.app-header-page-label.is-changes {
    border-color: rgba(255, 170, 0, 0.55);
    color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.app-header-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.app-header-stat {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    height: 40px;
    min-height: 40px;
    padding: 0 12px 0 10px;
    background: rgba(0, 255, 157, 0.08);
    border: 2px solid #00ff9d;
    border-radius: 8px;
    color: #00ff9d;
    white-space: nowrap;
    line-height: 1;
    box-sizing: border-box;
}

.app-header-stat.is-daily {
    border-color: #ffaa00;
    color: #ffaa00;
    background: rgba(255, 170, 0, 0.08);
}

/* Fixed-width icon slot so labels/values start on the same horizontal grid */
.app-header-stat .stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 1.1rem;
    line-height: 1;
    font-size: 0.95rem;
}

.app-header-stat .stat-icon i {
    display: block;
    line-height: 1;
    width: 1em;
    text-align: center;
}

/* Label + value share one baseline row */
.app-header-stat .stat-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    line-height: 1;
}

.app-header-stat .stat-label {
    display: inline-flex;
    align-items: center;
    width: 3.1rem; /* "Scans" / "Today" share the same column */
    flex: 0 0 3.1rem;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    opacity: 0.9;
    line-height: 1;
}

.app-header-stat .stat-value {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.app-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 14px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1;
    background: rgba(255, 255, 255, 0.04);
    color: #e0f8ff;
    border-color: rgba(255, 255, 255, 0.22);
}

.app-nav-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.08);
}

.app-nav-btn.is-active {
    color: #000;
    background: #00ff9d;
    border-color: #00ff9d;
    box-shadow: 0 0 14px rgba(0, 255, 157, 0.35);
}

.app-nav-btn.is-active:hover {
    color: #000;
    filter: brightness(1.05);
}

.app-nav-btn-buy {
    background: linear-gradient(90deg, #00ff9d, #00cc7a);
    color: #000;
    border-color: transparent;
}

.app-nav-btn-buy:hover {
    color: #000;
    filter: brightness(1.08);
    border-color: transparent;
}

.app-nav-btn-admin {
    border-color: #ff00aa;
    color: #ff00aa;
    background: rgba(255, 0, 170, 0.08);
}

.app-nav-btn-admin:hover {
    color: #ff66cc;
    border-color: #ff66cc;
    background: rgba(255, 0, 170, 0.14);
}

.app-nav-btn-admin.is-active {
    color: #fff;
    background: linear-gradient(90deg, #ff00aa, #c0007a);
    border-color: transparent;
    box-shadow: 0 0 14px rgba(255, 0, 170, 0.35);
}

.app-nav-btn-logout {
    background: transparent;
    color: #ff00aa;
    border-color: #ff00aa;
}

.app-nav-btn-logout:hover {
    background: rgba(255, 0, 170, 0.12);
    color: #ff00aa;
    border-color: #ff00aa;
}

/* Secondary strip for admin sub-pages only — does not replace primary nav */
.app-subheader {
    background: rgba(17, 17, 51, 0.95);
    border-bottom: 1px solid rgba(255, 0, 170, 0.25);
}

.app-subheader-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0.55rem 0;
}

.app-subheader-link {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    color: rgba(224, 248, 255, 0.75);
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.app-subheader-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.app-subheader-link.is-active {
    color: #ff00aa;
    border-color: rgba(255, 0, 170, 0.4);
    background: rgba(255, 0, 170, 0.1);
}

@media (max-width: 768px) {
    .app-header-title {
        font-size: 1.35rem;
        letter-spacing: 3px;
    }

    .app-header-brand img {
        width: 42px;
        height: 42px;
    }

    .app-header-stat {
        height: 36px;
        min-height: 36px;
        padding: 0 10px 0 8px;
        gap: 6px;
    }

    .app-nav-btn {
        height: 36px;
        padding: 0 11px;
        font-size: 0.78rem;
    }

    .app-header-stat .stat-label {
        width: auto;
        flex: 0 0 auto;
    }

    .app-header-stat .stat-value {
        font-size: 0.9rem;
    }
}
