/* === Biconow — Layout (navbar + bottom nav) === */
.desktop-menu, .desktop-only { display: none; }
.mobile-only { display: flex; }

.top-navbar {
    background: rgba(249, 251, 249, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid rgba(30, 41, 59, 0.06);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--dark);
    text-decoration: none;
    flex-shrink: 0;
}
.logo .dot { color: var(--primary); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-icon {
    background: var(--white);
    border: 1px solid rgba(30, 41, 59, 0.08);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--dark);
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}
.btn-icon:hover {
    border-color: rgba(106, 153, 105, 0.35);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.notification { position: relative; }
.badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100px;
    border: 2px solid var(--white);
}

.profile-avatar {
    display: block;
    line-height: 0;
}
.profile-avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.profile-avatar:hover img {
    box-shadow: 0 0 0 2px var(--primary);
}

/* Bottom navigation — app nativo */
.bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(30, 41, 59, 0.06);
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    z-index: 200;
    box-shadow: 0 -8px 32px rgba(30, 41, 59, 0.04);
}

.nav-item {
    flex: 1;
    max-width: 72px;
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    border-radius: 14px;
    position: relative;
    min-height: 52px;
}
.nav-item i {
    font-size: 20px;
    transition: transform 0.2s ease;
}
.nav-item span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.nav-item.active {
    color: var(--primary);
}
.nav-item.active i {
    transform: scale(1.08);
}
.nav-badge {
    position: absolute;
    top: 4px;
    right: 12px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 800;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.fab-wrapper {
    flex: 0 0 auto;
    max-width: none;
    margin-top: -28px;
    position: relative;
    z-index: 2;
}
.fab-create {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg, #7aad79 0%, var(--primary) 50%, var(--primary-dark) 100%);
    color: white;
    font-size: 22px;
    box-shadow: 0 12px 28px rgba(106, 153, 105, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    border: 3px solid var(--white);
}
.fab-create:hover,
.fab-create:active {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 32px rgba(106, 153, 105, 0.45);
}

@media (min-width: 768px) {
    .mobile-only { display: none !important; }
    .desktop-only { display: flex; }
    .top-navbar { padding: 14px 0; }

    .desktop-menu {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        margin-right: auto;
    }
    .desktop-menu a {
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 600;
        font-size: 14px;
        padding: 10px 16px;
        border-radius: 100px;
        transition: var(--transition);
    }
    .desktop-menu a:hover {
        color: var(--dark);
        background: rgba(30, 41, 59, 0.04);
    }
    .desktop-menu a.active {
        color: var(--dark);
        background: var(--white);
        box-shadow: var(--shadow-sm);
    }
}

/* --- Premium shell refinement --- */
.top-navbar {
    background: rgba(246, 248, 246, 0.86);
    border-bottom: 1px solid rgba(23, 32, 51, 0.07);
}

.nav-content {
    min-height: 48px;
}

.logo {
    font-size: 25px;
}

.desktop-menu {
    padding: 4px;
    border: 1px solid rgba(23, 32, 51, 0.06);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.66);
}

.desktop-menu a.active {
    color: var(--dark);
    background: var(--white);
    box-shadow: 0 8px 18px rgba(23, 32, 51, 0.06);
}

.btn-icon,
.profile-avatar img {
    box-shadow: 0 8px 20px rgba(23, 32, 51, 0.045);
}

.bottom-navbar {
    height: calc(72px + env(safe-area-inset-bottom));
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
}

.nav-item {
    min-height: 56px;
}

.nav-item.active {
    background: var(--primary-soft);
}

.fab-create {
    width: 58px;
    height: 58px;
}

@media (min-width: 768px) {
    .bottom-navbar {
        display: none !important;
    }
}

/* --- Canonical app shell: keep header and nav identical on every page --- */
.top-navbar {
    height: 76px;
    padding: 0;
    background: rgba(246, 248, 246, 0.94);
    border-bottom: 1px solid rgba(23, 32, 51, 0.07);
    box-shadow: none;
}

.top-navbar .nav-content {
    height: 76px;
    min-height: 76px;
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
    align-items: center;
    gap: 24px;
}

.top-navbar .logo {
    justify-self: start;
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.045em;
}

.top-navbar .desktop-menu {
    justify-self: center;
    display: none;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px;
    min-height: 52px;
    border: 1px solid rgba(23, 32, 51, 0.06);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
}

.top-navbar .desktop-menu a {
    min-width: 108px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.top-navbar .desktop-menu a:hover,
.top-navbar .desktop-menu a.active {
    color: var(--dark);
    background: var(--white);
    box-shadow: 0 8px 18px rgba(23, 32, 51, 0.06);
}

.top-navbar .nav-actions {
    justify-self: end;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-navbar .btn-icon,
.top-navbar .profile-avatar img {
    width: 42px;
    height: 42px;
}

@media (min-width: 768px) {
    .top-navbar .desktop-menu {
        display: flex;
    }
}

@media (max-width: 767px) {
    .top-navbar {
        height: 66px;
    }

    .top-navbar .nav-content {
        height: 66px;
        min-height: 66px;
        display: flex;
        justify-content: space-between;
        gap: 16px;
    }
}
